You are here: irt.org | FAQ | JavaScript | Form | Q1447 [ previous next ]
Try:
<script language="JavaScript"><!--
function changed(form) {
if (form.theSelect.options[form.theSelect.selectedIndex].value == 'yes') {
form.theRadio.checked=true;
form.theCheckbox.checked=true;
}
else {
form.theRadio.checked=false;
form.theCheckbox.checked=false;
}
}
//--></script>
<form>
<select onChange="changed(this.form)" name="theSelect">
<option value="no">no
<option value="yes">yes
</select>
<input type="radio" name="theRadio">
<input type="checkbox" name="theCheckbox">
</form