A
AmitKu
<script>
function CheckChange()
{
var mycheck = document.getElementById('test');
mycheck.check = true;
}
</script>
<body>
<form id="form1" runat="server">
<asp:CheckBox ID="test" runat="server" name="test" />
<asp:CheckBox ID="CheckBox1" onclick="CheckChange()"
runat="server" />
</form>
</body>
</html>
I am trying to make it so that checking one check box checks another
using no postbacks (so basically that means using Javascript). Above
is my code, and for some reason it just doesn't work. Any ideas?
Btw instead of the above javascript, I'd rather write "test.check =
true" but that fails and Firefox's error console says "test is not
defined"
Thanks,
Amit
function CheckChange()
{
var mycheck = document.getElementById('test');
mycheck.check = true;
}
</script>
<body>
<form id="form1" runat="server">
<asp:CheckBox ID="test" runat="server" name="test" />
<asp:CheckBox ID="CheckBox1" onclick="CheckChange()"
runat="server" />
</form>
</body>
</html>
I am trying to make it so that checking one check box checks another
using no postbacks (so basically that means using Javascript). Above
is my code, and for some reason it just doesn't work. Any ideas?
Btw instead of the above javascript, I'd rather write "test.check =
true" but that fails and Firefox's error console says "test is not
defined"
Thanks,
Amit