Drop Down Menus
Ok, This one's got me...
How do you make the dropdown menus so that when you select something in one dropdown box, you get specific choices in a second one.
For example: If you have a drop down box with States in it, and you select California, a second drop down box will appear (or I guess that it can be there to begin with) that will have cities in California listed.... or if you select Wyoming, the second drop down box will have cities in Wyoming listed.
Anyone know?
Suzanne posted this at 00:27 — 13th February 2002.
She has: 5,507 posts
Joined: Feb 2000
http://tech.irt.org/articles/js042/index.htm
when in doubt, try irt.org for existing tutorials!
Hmmm, reading it over, it's quite old (1997) -- there are probably easier ways now. Did you look at the javascript script sites?
Suzanne
DC_Sara posted this at 01:32 — 13th February 2002.
She has: 392 posts
Joined: Jan 2002
Here's a site a ran into a while back, maybe you can find what you are looking for...
Simply the Best
There are some drop down menus like you are describing there.
Sara
~*Sara*~
detox posted this at 13:45 — 13th February 2002.
They have: 571 posts
Joined: Feb 2001
I am sure i posted a reply to the same question a couple of days ago, will have a look. It was a fairly big and clunky javascript solution, but it did the job.
zimbabwe posted this at 23:47 — 13th February 2002.
They have: 58 posts
Joined: May 2001
These are great dropdowns! This is exactly what I meant! THANKS!!! However... After looking at the scripting involved, it doesn't seem very practical to do it this way for what I am doing.
What I am doing is creating a list of dial-up phone numbers for a nationwide ISP so that customers can look to see if they have a number near them and if they do, what it is. I would need a three stage series of drop down boxes. I have over 2500 phone numbers to handle. Typing out all that code as you could see would be a monstrous nightmare! My goal is to have this done by the end of the month along with several other projects.
Is there anything that you know that would be any simpler / quicker? I am experimenting with PHP and MySQL databases, but haven't had much luck getting something going.... probably because I just started learning MySQL.
detox posted this at 13:18 — 15th February 2002.
They have: 571 posts
Joined: Feb 2001
Doing something like this with a server side language to my mind is much easier. You have the ability to call your results from a database?text file etc, so essentially what you come up with is way more dynamic and less cumbersome.
I could whip up something in ASP really quickly for you but if you need it done in PHP then I would have to step aside.
Anyone else able to do this?
I could probably put something together following ASP logic in PHP but it would probably be faster if someone else did it...
good luck!
zimbabwe posted this at 22:41 — 15th February 2002.
They have: 58 posts
Joined: May 2001
asp would work.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.