Subject: JScript to control select boxes: how?
From: James Birchler <jamesbirchler@y...>
well you have to give the boxes names first like this
<form>
<input type="checkbox" name="check1" onClick="doCheck(this.form)">
<input type="checkbox" name="check2" onClick="doCheck(this.form)">
<input type="checkbox" name="check3" onClick="doCheck(this.form)">
</form>
and your script should be
function doCheck(yourForm) {
if ( yourForm.check3.checked ) { //your box is checked
yourForm.check1.checked=false;
yourForm.check2.checked=false;
}
}
and remember to put
<meta http-equiv="Content-Script-Type" content="text/jscript">
when you use scripts to handle events