in aspx file I have
<asp:DropDownList ID="DropDownList1" runat="server" >
</asp:DropDownList>
<asp:DropDownList ID="DropDownList2" runat="server">
</asp:DropDownList>
<asp:Button ID="load_data" runat="server" Text="<%$ Resources : load_data %>"
onclick="load_data_class_Click" Visible="False"/>
Now I want to set button to be visible only after i made changes in 2 dropdownlists in javascript
how to do this?
The first problem is that you can’t use Visible=”false”, you need to use CSS and set visibility: hidden;, or display:none.
Once you’ve done that, you can do the following ->
Get the ID’s of the lists:
Now, we need to create an onChange function to grab the values, and test if they’re empty, if not, then we’ll show the button.
Then, in your dropdown list, you can add the onChange=showButton();
Should work.