in reply to HTML/Perl form question

Greetings all,
Here is an example of what we do when we need contingent dropdowns.
<script language="JavaScript" type="text/javascript"> var comm_list = new Array(); comm_list[0] = new Array("first", 34, 37); comm_list[1] = new Array("second", 35, 37); comm_list[2] = new Array("third", 36, 37); comm_list[3] = new Array("primary", 42, 38); comm_list[4] = new Array("secondary", 43, 38); </script> <script language="JavaScript" type="text/javascript"> function change_dd(parent, target, list){ var f = parent.form; var value = parent.options[parent.options.selectedIndex].value +; f.elements[target].options.length = 0; if(value == "0"){ var newopt = new Option('--- Select an Option ---', '0'); f.elements[target].options[f.element[target].options.lengt +h] = newopt; }else{ for(var i = 0; i < list.length; i++){ if(list[i][2] == value){ var newopt = new Option(list[i][0], list[i][1]); f.elements[target].options[f.elements[target].opti +ons.length] = newopt; } } } } </script>
And here is the call from your the controlling dropdown in this case it would be your categories.
<select name="selection" onChange="change_dd(this, 'other_dd', comm_li +st)"> <option value="0">--- Select a Type ---</option> <option value="38">positional</option> <option value="37">numeric</option> </select> <select name="other_dd"> </select>
A little explaination is in order eh?
the "selection" dropdown calls the function change_dd and sends it itself, the other dropdown to populate as well as which list to use to do the population of the dropdown. So you will need the other dropdown set up for the population to take place.
The list "comm_list" is created based on the selections available in the "selection" dropdown and contain in this order: the text to display, the value to pass, the parent id for the association.
Let me know if you have any questions.

-InjunJoel

"I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo