<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2712.300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Firstly, Happy New Year to all!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Now on to the fun stuff!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This is a different twist on the issue I mailed
about last year! ;-)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I now have the dropdown's initially written by ASP.
Then, when a user selects a value of the first of three drop downs, the second
ammends itself accordingly; then when they choose from that modified second
dropdown, the third is set to specific values! I'm sure many of you have seen
this type of thing, but I will add the full code to the end of this
email!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>My question is this:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The drop downs are populated by a specific listing
of variables depending on the choice of the first dropdown, but all
varaibles are repeated at one time or another, maybe more. And the last
menu choices are the same for most of the second set of options, with only a few
needing modification upon selection.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Is there a way to not have to write the same option
variables for each of the six initial options, and can I have only the second
sets of options that would modif the third list only do just that?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Please take a look at this code and see what you
think!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks in advance,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Jon</FONT></DIV>
<DIV><FONT face=Arial size=2><!code snippett></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><head></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><script language="JavaScript"><BR><!--
Begin<BR>var f = "Fighter";<BR>var p = "Paladin";<BR>var r = "Ranger";<BR>var m
= "Mage";<BR>var c = "Cleric";<BR>var d = "Druid";<BR>var l =
"Illusionist";<BR>var t = "Thief";<BR>var b = "Bard";<BR>var ft =
"Fighter/Thief";<BR>var fm = "Fighter/Mage";<BR>var fc =
"Fighter/Cleric";<BR>var fd = "Fighter/Druid";<BR>var fl =
"Fighter/Illusionist";<BR>var mt = "Mage/Thief";<BR>var lc =
"Illusionist/Cleric";<BR>var lt = "Illusionist/Thief";<BR>var dm =
"Druid/Mage";<BR>var dr = "Druid/Ranger";<BR>var cr = "Cleric/Ranger";<BR>var cm
= "Cleric/Mage";<BR>var fmt = "Fighter/Mage/Thief";<BR>var fdm =
"Fighter/Druid/Mage";<BR>var fmc = "Fighter/Mage/Cleric";</FONT></DIV>
<DIV> </DIV><FONT face=Arial size=2>
<DIV><BR>var ac1 = new Array();<BR>var aa1 = new Array();</DIV>
<DIV> </DIV>
<DIV>//--human classes<BR>ac1[1] = f; aa1[1] = 1;<BR>ac1[2] = p; aa1[2] =
1;<BR>ac1[3] = r; aa1[3] = 1;<BR>ac1[4] = m; aa1[4] = 1;<BR>ac1[5] = c; aa1[5] =
1;<BR>ac1[6] = d; aa1[6] = 1;<BR>ac1[7] = t; aa1[7] = 1;<BR>ac1[8] = b; aa1[8] =
1;<BR>ac1[9] = ft; aa1[9] = 1;<BR>ac1[10] = fm; aa1[10] = 1;<BR>ac1[11] = fc;
aa1[11] = 1;<BR>ac1[12] = fd; aa1[12] = 1;<BR>ac1[13] = mt; aa1[13] =
1;<BR>ac1[14] = cr; aa1[14] = 1;<BR>ac1[15] = cm; aa1[15] = 1;<BR>ac1[16] = fmt;
aa1[16] = 1;<BR>ac1[17] = fmc; aa1[17] = 1;</DIV>
<DIV> </DIV>
<DIV>//--dwarf classes<BR>ac1[20] = f; aa1[20] = 2;<BR>ac1[21] = c; aa1[21] =
2;<BR>ac1[22] = t; aa1[22] = 2;<BR>ac1[23] = ft; aa1[23] = 2;<BR>ac1[24] = fc;
aa1[24] = 2;</DIV>
<DIV> </DIV>
<DIV>//--elfen classes<BR>ac1[30] = f; aa1[30] = 3;<BR>ac1[31] = c; aa1[31] =
3;<BR>ac1[32] = r; aa1[32] = 3;<BR>ac1[33] = m; aa1[33] = 3;<BR>ac1[34] = t;
aa1[34] = 3;<BR>ac1[35] = fm; aa1[35] = 3;<BR>ac1[36] = ft; aa1[36] =
3;<BR>ac1[37] = fmt; aa1[37] = 3;<BR>ac1[38] = mt; aa1[38] = 3;</DIV>
<DIV> </DIV>
<DIV>//--gnome classes<BR>ac1[40] = f; aa1[40] = 4;<BR>ac1[41] = c; aa1[41] =
4;<BR>ac1[42] = l; aa1[42] = 4;<BR>ac1[43] = t; aa1[43] = 4;<BR>ac1[44] = ft;
aa1[44] = 4;<BR>ac1[45] = lc; aa1[45] = 4;</DIV>
<DIV> </DIV>
<DIV>//--Half-Elf classes<BR>ac1[50] = f; aa1[50] = 5;<BR>ac1[51] = r; aa1[51] =
5;<BR>ac1[52] = m; aa1[52] = 5;<BR>ac1[53] = c; aa1[53] = 5;<BR>ac1[54] = d;
aa1[54] = 5;<BR>ac1[55] = t; aa1[55] = 5;<BR>ac1[56] = b; aa1[56] =
5;<BR>ac1[57] = fc; aa1[57] = 5;<BR>ac1[58] = cr; aa1[58] = 5;<BR>ac1[59] = fd;
aa1[59] = 5;<BR>ac1[60] = dr; aa1[60] = 5;<BR>ac1[61] = cm; aa1[61] =
5;<BR>ac1[62] = dm; aa1[62] = 5;<BR>ac1[63] = fmc; aa1[63] = 5;<BR>ac1[64] =
fdm; aa1[64] = 5;<BR>ac1[65] = fm; aa1[65] = 5;<BR>ac1[66] = ft; aa1[66] =
5;<BR>ac1[67] = fmt; aa1[67] = 5;<BR>ac1[68] = mt; aa1[68] = 5;</DIV>
<DIV> </DIV>
<DIV>//-- halfling classes<BR>ac1[70] = f; aa1[70] = 6;<BR>ac1[71] = c; aa1[71]
= 6;<BR>ac1[72] = t; aa1[72] = 6;<BR>ac1[73] = ft; aa1[73] = 6;</DIV>
<DIV> </DIV>
<DIV><BR>//-- alignment assignments<BR>var lg = "Lawful Good";<BR>var ln =
"Lawful Neutral";<BR>var le = "Lawful Evil";<BR>var ng = "Neutral Good";<BR>var
tn = "True Neutral";<BR>var ne = "Neutral Evil";<BR>var cg = "Chaotic
Good";<BR>var cn = "Chaotic Neutral";<BR>var ce = "Chaotic Evil";</DIV>
<DIV> </DIV>
<DIV>var ac2 = new Array();<BR>var aa2 = new Array();</DIV>
<DIV> </DIV>
<DIV>ac2[100] = lg; aa2[100] = 1;<BR>ac2[101] = ln; aa2[101] = 1;<BR>ac2[102] =
le; aa2[102] = 1;<BR>ac2[103] = ng; aa2[103] = 1;<BR>ac2[104] = tn; aa2[104] =
1;<BR>ac2[105] = ne; aa2[105] = 1;<BR>ac2[106] = cg; aa2[106] = 1;<BR>ac2[107] =
cn; aa2[107] = 1;<BR>ac2[108] = ce; aa2[108] = 1;</DIV>
<DIV> </DIV>
<DIV>ac2[200] = lg; aa2[200] = 2;</DIV>
<DIV> </DIV>
<DIV>ac2[300] = lg; aa2[300] = 3;<BR>ac2[301] = ng; aa2[301] = 3;<BR>ac2[302] =
cg; aa2[302] = 3;</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><BR>function selectChange(control, controlToPopulate, ItemArray,
GroupArray)<BR>{<BR> var myEle;<BR> var x;<BR> // Empty the
second drop down box of any choices<BR> for (var
q=controlToPopulate.options.length; q>=0; q--)
controlToPopulate.options[q]=null;<BR> <BR> if (control.name ==
"secondChoice") {<BR> // Empty the third drop down box of any
choices<BR> for (var q=myChoices.thirdChoice.options.length;
q>=0; q--) myChoices.thirdChoice.options[q] = null;<BR> }<BR> //
ADD Default Choice - in case there are no values<BR> myEle =
document.createElement("option") ;<BR> myEle.value = 0 ;<BR>
myEle.text = "<--Please Select One-->" ;<BR>
controlToPopulate.add(myEle) ;<BR> // Now loop through the array of
individual items<BR> // Any containing the same child id are added
to<BR> // the second dropdown box<BR> for ( x = 0 ; x <
ItemArray.length ; x++ )<BR>
{<BR> if ( GroupArray[x] == control.value
)<BR>
{<BR> myEle =
document.createElement("option")
;<BR> myEle.value = x
;<BR> myEle.text =
ItemArray[x] ;<BR>
controlToPopulate.add(myEle) ;<BR>
}<BR> }<BR>}<BR>// End --><BR></script></DIV>
<DIV> </DIV>
<DIV></head><BR><body></DIV>
<DIV> </DIV>
<DIV><form action="" name="myChoices" id="myChoices"><BR><table
align="center"><BR> <tr><BR> <td><BR>
<select name="firstChoice" id="firstChoice" onChange="selectChange(this,
myChoices.secondChoice, ac1, aa1);"><BR> <option value="0"
selected><--Please Select One--></option><BR>
<option value='1'>Human</option><BR> <option
value='2'>Dwarf</option><BR> <option
value='3'>Elf</option><BR> <option
value='4'>Gnome</option><BR> <option
value='5'>Half-Elf</option><BR> <option
value='6'>Halfling</option><BR> </select><BR>
</td><BR> </tr><BR> <tr><BR>
<td><BR> <select name="secondChoice" id="secondChoice"
onChange="alert(this.value);selectChange(this, myChoices.thirdChoice,ac2, aa2);
"><!-- --><BR> <option value="100"
selected><--Please Select One--></option><BR>
<option value='101'>Fighter</option><BR> <option
value='102'>Paladin</option><BR> <option
value='103'>Ranger</option><BR> <option
value='104'>Mage</option><BR> <option
value='105'>Cleric</option><BR> <option
value='106'>Druid</option><BR> <option
value='107'>Thief</option><BR> <option
value='108'>Bard</option><BR> <option
value='109'>Multi-Classed</option><BR>
</select><BR>
</td><BR> </tr><BR> <tr><BR>
<td><BR> <select name="thirdChoice" id="thirdChoice"
onChange="alert(this.value);"><BR> <option value="200"
selected><--Please Select One--></option><BR>
<option value='201'>Lawful Good</option><BR> <option
value='202'>Lawful Neutral</option><BR> <option
value='203'>Lawful Evil</option><BR> <option
value='204'>Neutral Good</option><BR> <option
value='205'>True Neutral</option><BR> <option
value='206'>Neutral Evil</option><BR> <option
value='207'>Chaotic Good</option><BR> <option
value='208'>Chaotic Neutral</option><BR> <option
value='209'>Chaotic Evil</option><BR>
</select><BR>
</td><BR> </tr><BR></table><BR></form><BR></body><BR></html></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></code snippett!></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>" Art must take reality by surprise. "
</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Frantoise
Sagan</FONT></DIV></FONT></DIV></BODY></HTML>