I have 2 pull down menus called "dept" and "discipline". I want the discipline pull down menu values to be dependent on the chosen values of the "dept". For ex., if dept=PRCL, then values for discipline= ACH, GEN, if dept=DISC, the discipline=CHM, and all else discipline=GEN .
I don't know how to write the syntax for this. This is what I have so far, which did not work, but instead display all of the values.
<select name="discipline" id="discipline">
if document.all.dept.value="PRCL" then
<option value = "ACH">ACH</option>
<option value = "GEN">GEN</option>
elseif document.all.dept.value= "DISC" then
<option value = "CHM">CHM</option>
else
<option value = "GEN">GEN</option>
</select>
Thanks!
I don't know how to write the syntax for this. This is what I have so far, which did not work, but instead display all of the values.
<select name="discipline" id="discipline">
if document.all.dept.value="PRCL" then
<option value = "ACH">ACH</option>
<option value = "GEN">GEN</option>
elseif document.all.dept.value= "DISC" then
<option value = "CHM">CHM</option>
else
<option value = "GEN">GEN</option>
</select>
Thanks!