SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
-
Apr 7, 2009, 06:34 #1
After select "United States" from the Drop down box 1 => Drop down box 2 shows states
Hi guys,
I have a drop down box that allows the user to select the countries.
Code HTML4Strict:<select size="1" name="D21"> <option> Afghanistan </option> <option> Aland Islands </option> <option> Albania </option> <option> Algeria </option> <option> American Samoa </option> . . . and etc.... </select>
How do I create a drop down box number 2, where If the user selects United States in drop down box 1, it will display all the states (e.g NY, LA...) for the user to select in drop down box 2
Is there any scripts online that does this ?
Thanks for the advice provided
-
Apr 7, 2009, 06:53 #2
-
Apr 7, 2009, 07:58 #3
- Join Date
- Oct 2006
- Location
- France, deep rural.
- Posts
- 6,869
- Mentioned
- 17 Post(s)
- Tagged
- 1 Thread(s)
'chained listboxes' is one of the terms I have come across to describe this, its usually a JS job, though as I expect you don't have a corresponging list of states in Afghanistan, you may just want to hide us states unless the user picks 'usa'.
-
Apr 7, 2009, 08:54 #4
-
Apr 7, 2009, 09:30 #5
did a little search , and found the answer here - http://www.sitepoint.com/forums/showthread.php?t=208541
Bookmarks