There are some popups whose values depend on the settings in previous
popups (previous in the sense of tab order - they are on the same page).
What I haven't been able to dertermine is the best way to do this in a
web page.
Here is a bit of Javascript + HTML I used, modify to suit your needs:
<script language="Javascript"> var nullCats = [];
var artCats = ["55", "Studio Art", "56", "Art History", "57", "Dance", "59", "Drama/ Theater",
"61", "Music: General", "60", "Music: Choral", "63", "Music: Instrumental"];
var athleticsCats = ["64", "Athletic Director", "62", "Physical Education/ Health"];
var allCats = [nullCats, artCats, athleticsCats];
function removeAllOptions(selectObj) { var count = selectObj.length; for (var i = 0; i < count; ++i) { if (navigator.appName == "Netscape") selectObj.options[i] = null; else selectObj.options.remove(0); } }
function addOptions(obj, values, initialValue) { var selected = initialValue == "-" ? 0 : -1; var opt = new Option("Please select", "-", false, false); obj.options[0] = opt; for (var i = 0; i < values.length; i += 2) { opt = new Option(values[i+1], values[i], false, false); var index = (i/2) + 1; obj.options[index] = opt; if (selected < 0 && initialValue == obj.options[index].value) selected = index; } obj.selectedIndex = selected; }
function setSubcategory(cats, subcats, initialSubcat) { removeAllOptions(subcats); addOptions(subcats, allCats[cats.selectedIndex], initialSubcat); } </script>
<select name="f_category" class="cell" onChange="setSubcategory(this, form.f_subcategory)">
<%
c_string(255; $initialValue)
BuildSelectValueMenu("Please select;Administration;Art/Music;Athletics;Elementary Positions;English;History;Language;Librarian;Mathematics;Other; Religion;Science;Special Education;Technology/Computer Sciences"; "-;1;2;3;4;5;6;7;8;9;10;11;12;13;14"; 0; "-")
%>
</select>
Regards,
Aparajita Victory-Heart Productions [EMAIL PROTECTED] www.aparajitaworld.com
"If you dare to fail, you are bound to succeed." - Sri Chinmoy | www.srichinmoylibrary.com
