Dynamic Drop Down Menu

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ace2600
Forum Commoner
Posts: 30
Joined: Fri Jun 21, 2002 12:12 am

Dynamic Drop Down Menu

Post by ace2600 »

I am making a search query which ask you to choose a state from a drop down menu and then I want only counties from that state to be options in the next drop down menu, also on the same page. How would I do this with out the user having to press submit after selecting the state. Any and all help is appreciated!
-Ace
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Please read this:
http://www.devnetwork.net/forums/viewtopic.php?t=1030

Note point 2, basically the page has to be refreshed for PHP to generate the second drop down list.

Mac
ace2600
Forum Commoner
Posts: 30
Joined: Fri Jun 21, 2002 12:12 am

Post by ace2600 »

Thanks. I knew it was server side but I was hoping someone had a clever hack to get around this, maybe a hidden submit or something (wishful thinking). If anyone knows how to make dependent/dynamic select menus in java please tell me.
-Ace
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

I think you mean javascript, not java. Try somewhere like http://www.hotscripts.com they might have what you're looking for.

http://www.hotscripts.com/JavaScript/Sc ... ams/Forms/

Mac
ace2600
Forum Commoner
Posts: 30
Joined: Fri Jun 21, 2002 12:12 am

Post by ace2600 »

Thanks again, the site helped. I did mean javascript, your right. It was 3:30am when I was writing that.
Post Reply