Page 1 of 1
Related Dropdown Lists
Posted: Wed Aug 03, 2005 3:37 pm
by mustafamisir
Hi,
I have two dropdown lists. These lists take their values from database. The first lists have some titles. When you choose one, the second one's lists must be change according to the first one.
How can I do this?
Posted: Wed Aug 03, 2005 3:52 pm
by Roja
The term for that is "Chained Selectors". Google for that, and possibly "Javascript" as well.
http://www.mattkruse.com/javascript/dynamicoptionlist/
Does almost exactly what you describe. Hope that helps.
Posted: Wed Aug 03, 2005 5:19 pm
by feyd
There's also CoderGoblin's tutorial (in the tutorial section here)
Posted: Wed Aug 03, 2005 7:41 pm
by harrisonad
Hi. I also used that trick and I a bothered by it's slow performance when the number of items are large. The page will load after about 3 seconds(not including the graphics) and the form events will consume another 5 seconds to refresh the list.
Because of this, I prefer to load the page when an item of the first select box is selected.
Posted: Wed Aug 03, 2005 7:43 pm
by feyd
if the page requires faster response, but the drop downs can be a bit slower, you can always transport the data over XMLHTTP or other protocols..