Re: I need some help with dynamic drop-down boxes. For example, if you choose an item in the first box, the selections change in the second one?
Tuesday, November 2, 2004 09:44 PM
one hack that i could suggest is this:
Upon making a selection on one of the drop downs, call a java Scipt using the onChange attribute. i.e.
and in the java script have a funtion like this:
pFrm.action = pFrm.action + "&" + pSelect.name + "=" + pSelect.options[pSelect.selectedIndex].value;
What u've done in effect is u've fired the same action with the value of the selected option as an input parameter.
Handle this from the request and populate the contents of the second drop down into a collection or something and pass it back to the jsp....and voila, u have your second drop down in the jsp !!