2013-03-13 163 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

相关问题