PHP







Tutorial on Checkbox disable

JavaScript

<SCRIPT LANGUAGE="JavaScript">
<!-- 	
function chk_control(str) {
if(str=='dsb'){document.getElementById('ck1').disabled=true;}
else {document.getElementById('ck1').disabled=false;}
}
//  End -->
</script>

HTML

<form name=form1 method=post action=check.php>
<table width=200  >

<tr  ><td ><input type=checkbox name=ckb id=ck1 value=1></td><td >PHP</td></tr>
<tr  ><td ><br><br><input type=button value='Disable' onClick="chk_control('dsb')";></td>
<td ><br><br><input type=button value='Enable' onClick="chk_control('enb')";></td></tr>
</table></form>