So i have a checkbox and when it its checkSate is changed i want it to call a method.
heres my checkbox:
<tr><td><input type="checkbox" id="check2" name = "check2" Checked="True" runat="server" OnCheckedChanged="OnCheckedChangedMethod(count);">Sensor 1</input></td></tr>
then in my script i have:
<script type="text/javascript">
function OnCheckedChangedMethod(count) {
document.getElementById('mc_comboView_players').innerHTML = "<h1>" + count + "</h1>";
}
/*other functions*/
</script>
i have invoked the method via a button so i know that its works, its just not being called.
Any ideas, i think i have some wronge syntax but have not been able to figure it out.
ps i have looked else where first
Use
onchangeinstead ofOnCheckedChangedas OnCheckedChanged is not javascript event for checkbox change.Also pass some
validvalue inOnCheckedChangedMethodascountmight be undefined