I want to use one checkbox to enable and disable the other two checkboxes. When user click the two checkboxs, it keep the “click value” in it. How to reset the “unclick value” when the user click the other checkbox?
<html>
<head>
<script type=”text/javascript”>
function changer() {
if(this.form2.activator.checked){
this.form2.decision[0].disabled=false;
this.form2.decision[1].disabled=false;
}
else{
this.form2.decision[0].disabled=true;
this.form2.decision[1].disabled=true;
}
}
</script>
</head>
<body>
<table width=”400″ border=”1″ cellpadding=”0″ cellspacing=”0″>
<form name=”form2″ method=”post” action=””>
<tr>
<td colspan=”3″> <input type=”checkbox” name=”checkbox” value=”checkbox”>
A<br>
<input type=”checkbox” name=”checkbox” value=”checkbox”>
B<br>
<input type=”checkbox” name=”activator” value=”checkbox” onClick=”changer()”>
C<br>
</tr>
<tr>
<td width=”100″><input type=”checkbox” name=”decision” value=”first” disabled=”true”>
Oral </td>
<td width=”100″><input type=”checkbox” name=”decision” value=”second” disabled=”true”>
Written</td>
</tr>
</form>
</table>
</body>
</html>