2013-03-13 161 views
2

我有我的DropdownList國家和下拉列表的州/省/地區的Web應用程序。有沒有更好的辦法來處理國家/地區和國家/地區的國家名單?

如果我選擇國家,那麼它的相關州\省\地區應該動態填充。

人口是容易的事情。

但如何,我們應該在哪裏維護這個龐大的數據與國際沿着

+1

這是移動?或者是什麼?我會使用mongoDB來存儲它,因爲根本不知道你的情況的任何其他因素,因爲你可能從軟盤引導程序?它們很慢 – 2013-03-13 06:06:55

+0

不適用於移動設備,它適用於基於Spring的Web應用程序 – 2013-03-13 06:51:29

回答

3
step 1 : create data base for country names and related state names 
step 2 : make ajax call on select box for country on onchange event 
step 3 : the ajax call hits the db and return with the state names 
step 4 : set the value for state select box with the received response from ajax call 
+0

我做了同樣的事情,但我需要國家和州列表。我可以有現成的數據庫可用於國家和州挑選清單 – 2013-03-13 06:50:24

+0

@VinayakKedge:http://stackoverflow.com/questions/2463004/free-sql-script-to-get-a-list-of-countries-provinces-國家-和其型城市 – 2013-03-13 07:00:38

相關問題