awilinsk
awilinsk

Reputation: 2044

Country/State Dynamic Drop Down List

If you go to http://profile.microsoft.com and edit your personal information, you will select your country. When a country is selected the city and/or state information changes based on what is expected for that country. Does anyone have any examples on how to accomplish this? Is there any service (free service) that provides this information?

Upvotes: 4

Views: 8074

Answers (5)

lance
lance

Reputation: 16382

Regarding the data: Country, State, Province WebService?

Upvotes: 2

Sinan Taifour
Sinan Taifour

Reputation: 10825

You have to use Javascript to dynamically populate the city/state SELECT tag whenever the country SELECT tag is changed, which you can catch using an Event Handler.

Upvotes: 1

vaske
vaske

Reputation: 9552

Well it's based on your IP tracking, you can find users country via his IP address, all the list of Cities, for specific countries you can find somewhere and add it to your functionality, also you probably need some ajax functions for filing up drop downs or even better a JSON.

Upvotes: 0

lance
lance

Reputation: 16382

The CascadingDropdown control will give you this behavior.

Upvotes: 2

Henrik P. Hessel
Henrik P. Hessel

Reputation: 36647

Because you tagged your question with "jquery", here is an example of a "Depending / Cascading Selectbox" (which you are searching)

Demo

Upvotes: 3

Related Questions