Country State Drop Down | JavaScriptSource

Country State Drop Down

JavaScriptSource Staff Dec 9, 2005
A simple international country and state drop down list that automatically repopulates the state section based on the country selected without page refreshes. Select a country and the country's states or provinces are listed on the right. If the country doesn't have any states or provines configured, a text box is displayed.

The JavaScript Source: Forms : Country State Drop Down

Simply click inside the window below, use your cursor to highlight the script, and copy ([Control]+C) the script into a new file in your text editor (such as Note Pad) and save [Control+S]. The script is yours!!!

Did you use this script?  Do you like this site?  Please link to us!

Leave a Response


Need the city, state and country code dropdown list

prem Feb 20, 2017

This is exactly what I was looking for, saved me tons of time thank you!!!

Josh Feb 4, 2015

I have a problem in this script. If I change the country, i am getting empty state box. I don't see any states in india. How to add states.This script works only US. Thanks, Venkat

venkata Jul 24, 2014

Thanks for this great script. I have added my own countries city and working fine. thanks again

Muhammad Danish Sep 13, 2013

We tried using the "JavaScript Source: Forms : Country State Drop Down" and got an error message. the message read "unterminated regular expression literal 612: at line 613". Can you provide directions on fixing this error?

Mike Dec 10, 2012