...

View Full Version : Changing a selection list based on input from a previous selection list.



newname
07-06-2004, 06:47 PM
I'm building a form that will be used in a number of different countries. I would like to set it up so that when the user selects his country, another selection list would be added. For example, if he chooses USA, a list of states should be added...if he chooses Canada, a list of provinces would be added. What is the most straight forward way of doing this?

sad69
07-06-2004, 11:48 PM
Lots of material online for this one:
http://www.devarticles.com/c/a/JavaScript/Dynamically-Populating-Select-Menus-Client-Side/
http://webreference.com/dev/menus/intro2.html

You can use the ideas between these two links to do what you want (if you're placing the country information in a database that is. otherwise the second link should suffice).

I also came across this site in my search:
http://arctic.ithium.net/fr1.contact.html

It does basically what you want, just has a third select (continent).

Hope that helps,
Sadiq.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum