/ Published in: Python
I got halfway making this but switched to another method. Thought I'd save it just in case...
options_for_select(): http://pylonshq.com/WebHelpers/module-webhelpers.rails.form_options.html#options_for_select
Based on http://snipplr.com/view/169/us-states-and-world-countries-collection/, though removed some entries (England, Scotland, Palestine etc).
options_for_select(): http://pylonshq.com/WebHelpers/module-webhelpers.rails.form_options.html#options_for_select
Based on http://snipplr.com/view/169/us-states-and-world-countries-collection/, though removed some entries (England, Scotland, Palestine etc).
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
countries = [["Afghanistan", 1], ["Albania", 2], ["Algeria", 3], ["Andorra", 4], ["Angola", 5], ["Antigua and Barbuda", 6], ["Argentina", 7], ["Armenia", 8], ["Australia", 9], ["Austria", 10], ["Azerbaijan", 11], ["Bahamas", 12], ["Bahrain", 13], ["Bangladesh", 14], ["Barbados", 15], ["Belarus", 16], ["Belgium", 17], ["Belize", 18], ["Benin", 19], ["Bhutan", 20], ["Bolivia", 21], ["Bosnia and Herzegovina", 22], ["Botswana", 23], ["Brazil", 24], ["Brunei Darussalam", 25], ["Bulgaria", 26], ["Burkina Faso", 27], ["Burma", 28], ["Burundi", 29], ["Cambodia", 30], ["Cameroon", 31], ["Canada", 32], ["Cape Verde", 33], ["Central African Republic", 34], ["Chad", 35], ["Chile", 36], ["China", 37], ["Colombia", 38], ["Comoros", 39], ["Congo", 40], ["Democratic Republic of the Congo", 41], ["Costa Rica", 42], ["Côte d'Ivoire", 43], ["Croatia", 44], ["Cuba", 45], ["Cyprus", 46], ["Czech Republic", 47], ["Denmark", 48], ["Djibouti", 49], ["Dominica", 50], ["Dominican Republic", 51], ["East Timor", 52], ["Ecuador", 53], ["Egypt", 54], ["El Salvador", 55], ["Equatorial Guinea", 56], ["Eritrea", 57], ["Estonia", 58], ["Ethiopia", 59], ["Fiji", 60], ["Finland", 61], ["France", 62], ["Gabon", 63], ["Gambia", 64], ["Georgia", 65], ["Germany", 66], ["Ghana", 67], ["Greece", 68], ["Grenada", 69], ["Guatemala", 70], ["Guinea", 71], ["Guinea-Bissau", 72], ["Guyana", 73], ["Haiti", 74], ["Honduras", 75], ["Hungary", 76], ["Iceland", 77], ["India", 78], ["Indonesia", 79], ["Iran", 80], ["Iraq", 81], ["Ireland", 82], ["Israel", 83], ["Italy", 84], ["Jamaica", 85], ["Japan", 86], ["Jordan", 87], ["Kazakhstan", 88], ["Kenya", 89], ["Kiribati", 90], ["North Korea", 91], ["South Korea", 92], ["Kuwait", 93], ["Kyrgyzstan", 94], ["Laos", 95], ["Latvia", 96], ["Lebanon", 97], ["Lesotho", 98], ["Liberia", 99], ["Libya", 100], ["Liechtenstein", 101], ["Lithuania", 102], ["Luxembourg", 103], ["Macedonia", 104], ["Madagascar", 105], ["Malawi", 106], ["Malaysia", 107], ["Maldives", 1], ["Mali", 1], ["Malta", 1], ["Marshall Islands", 1], ["Mauritania", 1], ["Mauritius", 1], ["Mexico", 1], ["Micronesia", 1], ["Moldova", 1], ["Monaco", 1], ["Mongolia", 1], ["Morocco", 1], ["Mozambique", 1], ["Myanmar", 1], ["Namibia", 1], ["Nauru", 1], ["Nepal", 1], ["The Netherlands", 1], ["New Zealand", 1], ["Nicaragua", 1], ["Niger", 1], ["Nigeria", 1], ["Norway", 1], ["Oman", 1], ["Pakistan", 1], ["Palau", 1], ["Panama", 1], ["Papua New Guinea", 1], ["Paraguay", 1], ["Peru", 1], ["The Philippines", 1], ["Poland", 1], ["Portugal", 1], ["Qatar", 1], ["Romania", 1], ["Russia", 1], ["Rwanda", 1], ["St. Kitts and Nevis", 1], ["St. Lucia", 1], ["St. Vincent and The Grenadines", 1], ["Samoa", 1], ["San Marino", 1], ["São Tomé and PrÃncipe", 1], ["Saudi Arabia", 1], ["Senegal", 1], ["Serbia and Montenegro", 1], ["Seychelles", 1], ["Sierra Leone", 1], ["Singapore", 1], ["Slovakia", 1], ["Slovenia", 1], ["Solomon Islands", 1], ["Somalia", 1], ["South Africa", 1], ["Spain", 1], ["Sri Lanka", 1], ["Sudan", 1], ["Suriname", 1], ["Swaziland", 1], ["Sweden", 1], ["Switzerland", 1], ["Syria", 1], ["Taiwan", 1], ["Tajikistan", 1], ["Tanzania", 1], ["Thailand", 1], ["Togo", 1], ["Tonga", 1], ["Trinidad and Tobago", 1], ["Tunisia", 1], ["Turkey", 1], ["Turkmenistan", 1], ["Tuvalu", 1], ["Uganda", 1], ["Ukraine", 1], ["United Arab Emirates", 1], ["United Kingdom", 1], ["United States", 1], ["Uruguay", 1], ["Uzbekistan", 1], ["Vanuatu", 1], ["Vatican City", 1], ["Venezuela", 1], ["Vietnam", 1], ["Yemen", 1], ["Yugoslavia", 1], ["Zaire", 1], ["Zambia", 1]]