I have some javascript that I'm trying to fire off when the checked status of a radiobutton is changed. its suppose to uncheck any checkboxes that are checked on my page. the checkboxes are named CheckBox1, CheckBox2, etc. Here is my javascript
and here is my code in my html:Code:<script type = "text/javascript"> function uncheckAll() { for (var j = 1; j <= 14; j++) { box = eval("document.Form1.CheckBox" + j); if (box.checked == true) box.checked = false; } } </script>
But when I load the page i get this error:Code:<asp:RadioButton id="OptionButton3" OnCheckedChanged="uncheckAll()" runat="server" Text="CONCENTRIC OR COMPRESSED" GroupName="CableType"></asp:RadioButton>
Compiler Error Message: BC30456: 'uncheckAll' is not a member of 'ASP._500_10_aspx'.
I'm coding in VS.net. Why can't it recognize it?
Thank you!




Reply With Quote