I am working on a radioButtonList that contains two items: one with a value of "Yes" and the other with a value of "No."
Below the radioButtonList, I have a panel that I would like to show when the "Yes" radiobutton is selected, and hide when the "No" radiobutton is selected. Originally, I used the AutoPostBack attribute for this functionality, but now I want to achieve it using Javascript to avoid any postbacks. Below is the code snippet. Any assistance on this matter would be highly appreciated.
<asp:RadioButtonList ID="rbl1" runat="server" onClick="changed(this);" >
<asp:ListItem Value="Yes">Yes</asp:ListItem>
<asp:ListItem Value="No">No</asp:ListItem>
<asp:Panel ID="panel1" runat="server">
<--other controls here -->
</asp:Panel>
function changed(rbl) {
//not sure what to put in here
}
Thank you in advance,
Zaps