Click to See Complete Forum and Search --> : Dynamic Dropdowns


jgbarber65
06-12-2006, 07:20 AM
I am posting in this section because I am a VB developer and not very good with c based languages. I haven't done much ASP yet but would like to learn. I have dropdown #1 that contains 10 items. Each item has a sub list found in dropdown #2. I want the dropdown #2 list, to change depending on what is selected in dropdown #1.

For example: If you selected 'Cars' from dropdown #1, dropdown #2 would contain 'Ford', 'Chevy', 'Honda', 'Suzuki', etc... but if you selected 'Animals' from dropdown #1, dropdown #2 would then contain 'Zebra', 'Frog', 'Horse', etc...

Can some please get me started with this?

Thank you,
Joe

vanny
06-12-2006, 05:57 PM
This is really a HTML question not an ASP one, you would use ASP to populate javascript arrays in the HTML, then in the first SELECT box you would have an onchange event. When this is fired, it would call the the appropriate items and add them to the second SELECT box.

Have a look in the javascript forum it may give you some better ideas. Do you have any HTML you can post and we can show you changes.