Hello all, im trying to hide/show a checkbox on checkbox change:
Any ideas why its not working?Code:<%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> protected void Page_Load(object sender, EventArgs e) { DiscretionaryCheckbox.Checked = true; } </script> <script type="text/javascript" language="javascript"> function Show(id) { el = document.getElementById(id); el.style.display = "block"; } function Hide(id) { el = document.getElementById(id); el.style.display = "none"; } </script> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <table style="width: 616px; height: 106px"> <tr> <td style="font-size: 9pt; width: 269px; font-family: Arial"> <asp:RadioButton ID="DiscretionaryCheckbox" runat="server" CssClass="Checkbox" GroupName="1" TabIndex="9" Text="Discretionary" onclientclick="Hide('Other');"/> <asp:RadioButton ID="OtherCheckbox" runat="server" CssClass="Checkbox" GroupName="1" TabIndex="10" Text="Other" onclientclick="Show('Other');""/></td> </tr> <tr> <td style="font-size: 9pt; width: 269px; font-family: Arial"> <asp:TextBox ID="Other" runat="server" CssClass="Textbox" TabIndex="11" style="display:none"></asp:TextBox></td> </tr> </table> </form> </body> </html>




Bookmarks