172
rated 0 times
[
173]
[
1]
/ answers: 1 / hits: 31056
/ 10 Years ago, wed, november 26, 2014, 12:00:00
I have form on page1.php:
<form method=POST action=page2.php>
<input type=checkbox name=F10 id=f10>
<input type=checkbox name=W10 id=w10>
<input type=checkbox name=F20 id=f20>
<input type=checkbox name=W20 id=w20>
<input type=checkbox name=F30 id=f30>
<input type=checkbox name=W30 id=w30>
</form>
I want to diable a checkbox if another checkbox is checked using javascript or XMLHttpRequest().
I tried doing it using javascript but it didn't work.
if(document.getElementById(f10).checked){
document.getElementById(w20).disabled=true;
}
More From » php