Forum Moderators: open
function showNon(){
if (document.formSel.classifi.value == "Non-Varsity" ¦¦ document.formSel.classifi.value == "Sub Non-Varsity"){
document.formSel.nonvar.style.display='';
} else {
document.formSel.nonvar.style.display='none';
document.formSel.nonvar.value = '';
}
}
and here is how you call it:
<td class="bstxt" height="26">Performing Group Type
<select class="inputbox" name="classifi" onChange="showNon()">
<option value="">Select</option>
<option value="Varsity">Varsity</option>
<option value="Non-Varsity">Non-Varsity</option>
<option value="Sub Non-Varsity">Sub Non-Varsity</option>
<option value="Combined">Combined</option>
</select>
<select class="inputbox" name="nonvar" style="display:none"><option value=""></option><option value="A">A</option><option value="B">B</option><option value="C">C</option><option value="D">D</option><option value="E">E</option><option value="F">F</option></select> Check for Composite Group <input type="checkbox" name="compos" value="Y" class="inputbox">
</td>
The first drop down is a list of classifications. When they select one, the onChange method is fired which calls the function. If the value matches on the key ones, it sets the style of the display attribute of the second dropdown box to '' (true) and you can see the second box.