Copy link to clipboard
Copied
I have several menus which are dynamically populated (with PHP and MYSQL). The information is category based. How do I dynamically populate the second menu based on the choice the user makes in the first menu (without having to submit and refresh the page-- i.e. I need to use javascript instead of the server-side PHP).
Example:
Main Categories: 1) Numbers 2) Letters
Sub Categories: 1 a
2 b
3 c
etc. etc.
the first menu contains the two main categories. I want the second list to be populated with only the sub categories of the main category the user chooses in the first menu (i.e. 1,2,3 etc. if he chose the main category 'Numbers' and a,b,c, etc. if he chose the main category 'Letters')
Is there an easy way to do this in Dreamweaver?
Thanks,
YWSW
Copy link to clipboard
Copied
How many items do you have in each dropdown? If it's a small number, you can download all of the options for the second dropdown and use client side javascript to filter based on the choice of the first dropdown. If the number is large, you'll need to use AJAX to dynamically pull the related items from the database.
Search the web for "dependent dropdown" or "cascading dropdown" for some technical details.
Copy link to clipboard
Copied
breqent, thanks for the response.
both the first and second menu are very large. I also have other large sub-category menus as well. I there any simple way to do this in dreamweaver?
Copy link to clipboard
Copied
>I there any simple way to do this in dreamweaver?
I don't know of any DW server behaviors that will do this, if that's what you mean. You're going to need to do some coding here.
Copy link to clipboard
Copied
okay.
I searched for dependant dropdown as you had suggested and I came across this Adobe article that seems to be reffering to a dreamweaver dependant dropdown wizard, but I cannot find this wizard in my version (cs5). what is wrong?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now