• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1414
  • Last Modified:

Country Array

This script used to work for me but not too certain what i did to it.  Now here is the entire script:
<select NAME="country" onChange="populateSTATE();">
          <option VALUE>- Select Country -</option>
          <option VALUE="us">United States</option>
          <option VALUE="ca">Canada</option>
          <option VALUE="uk">United Kingdom</option>
          <option VALUE="au">Australia</option>
          <option VALUE></option>
          <option VALUE="al">Albania</option>
          <option VALUE="dz">Algeria</option>
          <option VALUE="as">American Samoa</option>
          <option VALUE="ad">Andorra Principality of</option>
          <option VALUE="ao">Angola</option>
          <option VALUE="ai">Anguilla</option>
          <option VALUE="aq">Antarctica</option>
          <option VALUE="ag">Antigua and Barbuda</option>
          <option VALUE="ar">Argentina</option>
          <option VALUE="am">Armenia</option>
          <option VALUE="aw">Aruba</option>
          <option VALUE="au">Australia</option>
          <option VALUE="at">Austria</option>
          <option VALUE="az">Azerbaidjan</option>
          <option VALUE="bs">Bahamas</option>
          <option VALUE="bh">Bahrain</option>
          <option VALUE="bd">Bangladesh</option>
          <option VALUE="bb">Barbados</option>
          <option VALUE="by">Belarus</option>
          <option VALUE="be">Belgium</option>
          <option VALUE="bz">Belize</option>
          <option VALUE="bj">Benin</option>
          <option VALUE="bm">Bermuda</option>
          <option VALUE="bt">Bhutan</option>
          <option VALUE="bo">Bolivia</option>
          <option VALUE="ba">Bosnia-Herzegovina</option>
          <option VALUE="bw">Botswana</option>
          <option VALUE="bv">Bouvet Island</option>
          <option VALUE="br">Brazil</option>
          <option VALUE="io">British Indian Ocean Territory</option>
          <option VALUE="bn">Brunei Darussalam</option>
          <option VALUE="bg">Bulgaria</option>
          <option VALUE="bf">Burkina Faso</option>
          <option VALUE="bi">Burundi</option>
          <option VALUE="kh">Cambodia Kingdom of</option>
          <option VALUE="cm">Cameroon</option>
          <option VALUE="ca">Canada</option>
          <option VALUE="cv">Cape Verde</option>
          <option VALUE="ky">Cayman Islands</option>
          <option VALUE="cf">Central African Republic</option>
          <option VALUE="td">Chad</option>
          <option VALUE="cl">Chile</option>
          <option VALUE="cn">China</option>
          <option VALUE="cx">Christmas Island</option>
          <option VALUE="cc">Cocos (Keeling) Islands</option>
          <option VALUE="co">Colombia</option>
          <option VALUE="km">Comoros</option>
          <option VALUE="cg">Congo</option>
          <option VALUE="cd">Congo The Democratic Republic of the</option>
          <option VALUE="ck">Cook Islands</option>
          <option VALUE="cr">Costa Rica</option>
          <option VALUE="hr">Croatia</option>
          <option VALUE="cu">Cuba</option>
          <option VALUE="cy">Cyprus</option>
          <option VALUE="cz">Czech Republic</option>
          <option VALUE="dk">Denmark</option>
          <option VALUE="dj">Djibouti</option>
          <option VALUE="dm">Dominica</option>
          <option VALUE="do">Dominican Republic</option>
          <option VALUE="tp">East Timor</option>
          <option VALUE="ec">Ecuador</option>
          <option VALUE="eg">Egypt</option>
          <option VALUE="sv">El Salvador</option>
          <option VALUE="gq">Equatorial Guinea</option>
          <option VALUE="er">Eritrea</option>
          <option VALUE="ee">Estonia</option>
          <option VALUE="et">Ethiopia</option>
          <option VALUE="fk">Falkland Islands</option>
          <option VALUE="fo">Faroe Islands</option>
          <option VALUE="fj">Fiji</option>
          <option VALUE="fi">Finland</option>
          <option VALUE="cs">Former Czechoslovakia</option>
          <option VALUE="su">Former USSR</option>
          <option VALUE="fr">France</option>
          <option VALUE="fx">France (European Territory)</option>
          <option VALUE="gf">French Guyana</option>
          <option VALUE="tf">French Southern Territories</option>
          <option VALUE="ga">Gabon</option>
          <option VALUE="gm">Gambia</option>
          <option VALUE="ge">Georgia</option>
          <option VALUE="de">Germany</option>
          <option VALUE="gh">Ghana</option>
          <option VALUE="gi">Gibraltar</option>
          <option VALUE="gb">Great Britain</option>
          <option VALUE="gr">Greece</option>
          <option VALUE="gl">Greenland</option>
          <option VALUE="gd">Grenada</option>
          <option VALUE="gp">Guadeloupe (French)</option>
          <option VALUE="gu">Guam (USA)</option>
          <option VALUE="gt">Guatemala</option>
          <option VALUE="gn">Guinea</option>
          <option VALUE="gw">Guinea Bissau</option>
          <option VALUE="gy">Guyana</option>
          <option VALUE="ht">Haiti</option>
          <option VALUE="hm">Heard and McDonald Islands</option>
          <option VALUE="va">Holy See (Vatican City State)</option>
          <option VALUE="hn">Honduras</option>
          <option VALUE="hk">Hong Kong</option>
          <option VALUE="hu">Hungary</option>
          <option VALUE="is">Iceland</option>
          <option VALUE="in">India</option>
          <option VALUE="id">Indonesia</option>
          <option VALUE="ir">Iran</option>
          <option VALUE="iq">Iraq</option>
          <option VALUE="ie">Ireland</option>
          <option VALUE="il">Israel</option>
          <option VALUE="it">Italy</option>
          <option VALUE="ci">Ivory Coast (Cote D&#39;Ivoire)</option>
          <option VALUE="jm">Jamaica</option>
          <option VALUE="jp">Japan</option>
          <option VALUE="jo">Jordan</option>
          <option VALUE="kz">Kazakhstan</option>
          <option VALUE="ke">Kenya</option>
          <option VALUE="ki">Kiribati</option>
          <option VALUE="kw">Kuwait</option>
          <option VALUE="kg">Kyrgyz Republic (Kyrgyzstan)</option>
          <option VALUE="la">Laos</option>
          <option VALUE="lv">Latvia</option>
          <option VALUE="lb">Lebanon</option>
          <option VALUE="ls">Lesotho</option>
          <option VALUE="lr">Liberia</option>
          <option VALUE="ly">Libya</option>
          <option VALUE="li">Liechtenstein</option>
          <option VALUE="lt">Lithuania</option>
          <option VALUE="lu">Luxembourg</option>
          <option VALUE="mo">Macau</option>
          <option VALUE="mk">Macedonia</option>
          <option VALUE="mg">Madagascar</option>
          <option VALUE="mw">Malawi</option>
          <option VALUE="my">Malaysia</option>
          <option VALUE="mv">Maldives</option>
          <option VALUE="ml">Mali</option>
          <option VALUE="mt">Malta</option>
          <option VALUE="mh">Marshall Islands</option>
          <option VALUE="mq">Martinique (French)</option>
          <option VALUE="mr">Mauritania</option>
          <option VALUE="mu">Mauritius</option>
          <option VALUE="yt">Mayotte</option>
          <option VALUE="mx">Mexico</option>
          <option VALUE="fm">Micronesia</option>
          <option VALUE="md">Moldavia</option>
          <option VALUE="mc">Monaco</option>
          <option VALUE="mn">Mongolia</option>
          <option VALUE="ms">Montserrat</option>
          <option VALUE="ma">Morocco</option>
          <option VALUE="mz">Mozambique</option>
          <option VALUE="mm">Myanmar</option>
          <option VALUE="na">Namibia</option>
          <option VALUE="nr">Nauru</option>
          <option VALUE="np">Nepal</option>
          <option VALUE="nl">Netherlands</option>
          <option VALUE="an">Netherlands Antilles</option>
          <option VALUE="nt">Neutral Zone</option>
          <option VALUE="nc">New Caledonia (French)</option>
          <option VALUE="nz">New Zealand</option>
          <option VALUE="ni">Nicaragua</option>
          <option VALUE="ne">Niger</option>
          <option VALUE="ng">Nigeria</option>
          <option VALUE="nu">Niue</option>
          <option VALUE="nf">Norfolk Island</option>
          <option VALUE="kp">North Korea</option>
          <option VALUE="mp">Northern Mariana Islands</option>
          <option VALUE="no">Norway</option>
          <option VALUE="om">Oman</option>
          <option VALUE="pk">Pakistan</option>
          <option VALUE="pw">Palau</option>
          <option VALUE="pa">Panama</option>
          <option VALUE="pg">Papua New Guinea</option>
          <option VALUE="py">Paraguay</option>
          <option VALUE="pe">Peru</option>
          <option VALUE="ph">Philippines</option>
          <option VALUE="pn">Pitcairn Island</option>
          <option VALUE="pl">Poland</option>
          <option VALUE="pf">Polynesia (French)</option>
          <option VALUE="pt">Portugal</option>
          <option VALUE="pr">Puerto Rico</option>
          <option VALUE="qa">Qatar</option>
          <option VALUE="re">Reunion (French)</option>
          <option VALUE="ro">Romania</option>
          <option VALUE="ru">Russian Federation</option>
          <option VALUE="rw">Rwanda</option>
          <option VALUE="gs">S. Georgia &amp; S. Sandwich Isls.</option>
          <option VALUE="sh">Saint Helena</option>
          <option VALUE="kn">Saint Kitts &amp; Nevis Anguilla</option>
          <option VALUE="lc">Saint Lucia</option>
          <option VALUE="pm">Saint Pierre and Miquelon</option>
          <option VALUE="st">Saint Tome (Sao Tome) and Principe</option>
          <option VALUE="vc">Saint Vincent &amp; Grenadines</option>
          <option VALUE="ws">Samoa</option>
          <option VALUE="sm">San Marino</option>
          <option VALUE="sa">Saudi Arabia</option>
          <option VALUE="sn">Senegal</option>
          <option VALUE="sc">Seychelles</option>
          <option VALUE="sl">Sierra Leone</option>
          <option VALUE="sg">Singapore</option>
          <option VALUE="sk">Slovak Republic</option>
          <option VALUE="si">Slovenia</option>
          <option VALUE="sb">Solomon Islands</option>
          <option VALUE="so">Somalia</option>
          <option VALUE="za">South Africa</option>
          <option VALUE="kr">South Korea</option>
          <option VALUE="es">Spain</option>
          <option VALUE="lk">Sri Lanka</option>
          <option VALUE="sd">Sudan</option>
          <option VALUE="sr">Suriname</option>
          <option VALUE="sj">Svalbard and Jan Mayen Islands</option>
          <option VALUE="sz">Swaziland</option>
          <option VALUE="se">Sweden</option>
          <option VALUE="ch">Switzerland</option>
          <option VALUE="sy">Syria</option>
          <option VALUE="tj">Tadjikistan</option>
          <option VALUE="tw">Taiwan</option>
          <option VALUE="tz">Tanzania</option>
          <option VALUE="th">Thailand</option>
          <option VALUE="tg">Togo</option>
          <option VALUE="tk">Tokelau</option>
          <option VALUE="to">Tonga</option>
          <option VALUE="tt">Trinidad and Tobago</option>
          <option VALUE="tn">Tunisia</option>
          <option VALUE="tr">Turkey</option>
          <option VALUE="tm">Turkmenistan</option>
          <option VALUE="tc">Turks and Caicos Islands</option>
          <option VALUE="tv">Tuvalu</option>
          <option VALUE="ug">Uganda</option>
          <option VALUE="ua">Ukraine</option>
          <option VALUE="ae">United Arab Emirates</option>
          <option VALUE="uk">United Kingdom</option>
          <option VALUE="us">United States</option>
          <option VALUE="uy">Uruguay</option>
          <option VALUE="um">USA Minor Outlying Islands</option>
          <option VALUE="uz">Uzbekistan</option>
          <option VALUE="vu">Vanuatu</option>
          <option VALUE="ve">Venezuela</option>
          <option VALUE="vn">Vietnam</option>
          <option VALUE="vg">Virgin Islands (British)</option>
          <option VALUE="vi">Virgin Islands (USA)</option>
          <option VALUE="wf">Wallis and Futuna Islands</option>
          <option VALUE="eh">Western Sahara</option>
          <option VALUE="ye">Yemen</option>
          <option VALUE="yu">Yugoslavia</option>
          <option VALUE="zr">Zaire</option>
          <option VALUE="zm">Zambia</option>
          <option VALUE="zw">Zimbabwe</option>
          </select>

<select NAME="state"></select>

</form>

And then I insert country.js as: <script LANGUAGE="javaScript" SRC="../javascripts/country.js"></script>
in country.js is:
var alArray = new Array("none");
var dzArray = new Array("none");
var asArray = new Array("none");
var adArray = new Array("none");
var aoArray = new Array("none");
var aiArray = new Array("none");
var aqArray = new Array("none");
var agArray = new Array("none");
var arArray = new Array( "Buenos Aires" , "Chaco" , "Chubut" , "Cordoba" , "Corrientes" , "Entre Rios" , "Jujuy" , "La Pampa" , "Mendoza" , "Misiones" , "Neuquen" , "Patagonia" , "Rio Negro" , "Salta" , "San Juan" , "San Luis" , "Santa Fe" , "Tierra del Fuego" , "Tucuman" );
var amArray = new Array("none");
var awArray = new Array("none");
var auArray = new Array( "Australian Capital Territory" , "New south Wales" , "Northern Territory" , "Queensland" , "South Australia" , "Tasmania" , "Victoria" , "Western Australia" );
var atArray = new Array( "Burgenland" , "Carinthia" , "Lower Austria" , "Salzburg" , "Styria" , "Tyrol" , "Upper Austria" , "Vienna" , "Vorarlberg" );
var azArray = new Array("none");
var bsArray = new Array("none");
var bhArray = new Array("none");
var bdArray = new Array("none");
var bbArray = new Array("none");
var byArray = new Array("none");
var beArray = new Array( "Antwerpen" , "Flemish Brabant" , "Hainaut" , "Liege" , "Limburg" , "Luxembourg" , "Namur" , "Oost-Vlaanderen" , "Walloon Brabant" , "West-Vlaandersn" );
var bzArray = new Array("none");
var bjArray = new Array("none");
var bmArray = new Array("none");
var btArray = new Array("none");
var boArray = new Array("none");
var baArray = new Array("none");
var bwArray = new Array("none");
var bvArray = new Array("none");
var brArray = new Array( "Acre" , "Alagoas" , "Amapa" , "Amazonas" , "Bahia" , "Ceara" , "Distrito Federal" , "Espirito Santo" , "Goias" , "Maranhao" , "Mato Grosso" , "Mato Grosso do Sul" , "Minas Gerais" , "Parana" , "Paraiba" , "Para" , "Pernambuco" , "Piaui" , "Rio de Janeiro" , "Rio Grande do Norte" , "Rio Grande do Sul" , "Rondonia" , "Roraima" , "Santa Catarina" , "Sergipe" , "Sao Paulo" , "Tocantins" );
var ioArray = new Array("none");
var bnArray = new Array("none");
var bgArray = new Array( "Burgas" , "Grad Sofiya" , "Lovech" , "Montana" , "Plovdiv" , "Sofiya" , "Varna" );
var bfArray = new Array("none");
var biArray = new Array("none");
var khArray = new Array("none");
var cmArray = new Array("none");
var caArray = new Array( "British Columbia" , "Alberta" , "Ontario" , "Manitoba" , "New Brunswick" , "Newfoundland" , "Northwest Territories" , "Nova Scotia" , "Prince Edward Island" , "Quebec" , "Saskatchewan" , "Yukon" );
var cvArray = new Array("none");
var kyArray = new Array("none");
var cfArray = new Array("none");
var tdArray = new Array("none");
var clArray = new Array( "Antofagasta" , "Atacama" , "Biobio" , "Coquimbo" , "La Araucania" , "Libertador Gral. Bernardo O'Higgins" , "Los Lagos" , "Magallanes" , "Maule" , "Patagonia" , "Rapa Nui (Easter Island)" , "Santiago" , "Valparaiso" );
var cnArray = new Array( "Anhui" , "Beijing" , "Chongqing" , "Fujian" , "Gansu" , "Guangdong" , "Guangxi" , "Guizhou" , "Hainan" , "Hebei" , "Heilongjiang" , "Henan" , "Hong Kong" , "Hubei" , "Hunan" , "Inner Mongolia" , "Jiangsu" , "Jiangxi" , "Jilin" , "Liaoning" , "Macau" , "Ningxia" , "Shaanxi" , "Shandong" , "Shanghai" , "Shanxi" , "Sichuan" , "Tianjin" , "Tibet" , "Xinjiang" , "Yunnan" , "Zhejiang" );
var cxArray = new Array("none");
var ccArray = new Array("none");
var coArray = new Array("none");
var kmArray = new Array("none");
var cgArray = new Array("none");
var cdArray = new Array("none");
var ckArray = new Array("none");
var crArray = new Array("none");
var hrArray = new Array("none");
var cuArray = new Array( "Ciudad de la Habana" , "Holguin" , "Isla de la Juventud" , "La Habana" , "Matanzas" );
var cyArray = new Array("none");
var czArray = new Array( "Bohemia" , "Jihocesky" , "Jihomoravsky" , "Moravia" , "Praha" , "Severocesky" , "Severomoravsky" , "Stredocesky" , "Vychodocesky" , "Zapadocesky" );
var dkArray = new Array("none");
var djArray = new Array("none");
var dmArray = new Array("none");
var doArray = new Array("none");
var tpArray = new Array("none");
var ecArray = new Array( "Azuay" , "Chimborazo" , "Esmeraldas" , "Galapagos" , "Guayas" , "Imbabura" , "Loja" , "Manabi" , "Pichincha" , "Tungurahua" );
var egArray = new Array("none");
var svArray = new Array("none");
var gqArray = new Array("none");
var erArray = new Array("none");
var eeArray = new Array("none");
var etArray = new Array("none");
var fkArray = new Array("none");
var foArray = new Array("none");
var fjArray = new Array("none");
var fiArray = new Array("none");
var csArray = new Array("none");
var suArray = new Array("none");
var frArray = new Array("none");
var fxArray = new Array("none");
var gfArray = new Array("none");
var tfArray = new Array("none");
var gaArray = new Array("none");
var gmArray = new Array("none");
var geArray = new Array("none");
var deArray = new Array( "Baden-Wuerttemberg" , "Bavaria" , "Berlin" , "Brandenburg" , "Bremen" , "Hamburg" , "Hessen" , "Mecklenburg-Vorpommern" , "Niedersachsen" , "Nordrhein-Westfalen" , "Rheinland-Pfalz" , "Saarland" , "Sachsen" , "Sachsen-Anhalt" , "Schleswig-Holstein" , "Thueringen" );
var ghArray = new Array("none");
var giArray = new Array("none");
var gbArray = new Array("none");
var grArray = new Array("none");
var glArray = new Array("none");
var gdArray = new Array("none");
var gpArray = new Array("none");
var guArray = new Array("none");
var gtArray = new Array("none");
var gnArray = new Array("none");
var gwArray = new Array("none");
var gyArray = new Array("none");
var htArray = new Array("none");
var hmArray = new Array("none");
var vaArray = new Array("none");
var hnArray = new Array("none");
var hkArray = new Array("none");
var huArray = new Array("none");
var isArray = new Array("none");
var inArray = new Array( "Andaman adn Nicobar" , "Andhra Pradesh" , "Arunachal Pradesh" , "Assam" , "Bihar" , "Chandigarh" , "Dadra and Nagar" , "Daman and Diu" , "Delhi" , "Goa" , "Gujarat" , "Haryana" , "Himachal Pradesh" , "Jammu and Kashmir" , "Karnataka" , "Kerala" , "Lakshadweep" , "Madhya Pradesh" , "Maharashtra" , "Manipur" , "Megahalaya" , "Mizoram" , "Nagaland" , "Orissa" , "Pondicherry" , "Punjab" , "Rajasthan" , "Sikkim" , "Tamil Nadu" , "Tripura" , "Uttar Pradesh" , "West Bengal" );
var idArray = new Array( "Bali" , "Irian Jaya" , "Jawa Barat" , "Jawa Tengah" , "Jawa Timur" , "Kalimantan Timur" , "Lampung" , "Maluku" , "Nusa Tenggara Barat" , "Nusa Tenggara Timur" , "Riau" , "Sulawesi Utara" , "Sumatera Utara" , "Timor Timur" , "Yogyakarta" );
var irArray = new Array("none");
var iqArray = new Array("none");
var ieArray = new Array("none");
var ilArray = new Array("none");
var itArray = new Array( "Agrigento" , "Alessandria" , "Ancona" , "Aosta" , "Arezzo" , "Ascoli Piceno" , "Asti" , "Avellino" , "Bari" , "Belluno" , "Bergamo" , "Biella" , "Bologna" , "Bolzano" , "Brescia" , "Cagliari" , "Campobasso" , "Catania" , "Catanzaro" , "Chieti" , "Como" , "Cosenza" , "Cremona" , "Cuneo" , "Ferrara" , "Florence" , "Foggia" , "Forli-Cesena" , "Frosinone" , "Genoa" , "Gorizia" , "Grosseto" , "Imperia" , "L'Aquila" , "La Spezia" , "Latina" , "L'Aquila" , "La Spezia" , "Latina" , "Lecco" , "Livorno" , "Lodi" , "Lucca" , "Macerata" , "Mantua" , "Massa-Carrara" , "Matera" , "Messina" , "Milan" , "Modena" , "Naples" , "Navara" , "Nuoro" , "Oristano" , "Padua" , "Palermo" , "Parma" , "Pavia" , "Perugia" , "Pesaro e Urbino" , "Pescara" , "Piacenza" , "Pisa" , "Pistoia" , "Pordenone" , "Potenza" , "Prato" , "Ragusa" , "Ravenna" , "Reggio Calabria" , "Reggio Emilia" , "Rieti" , "Rimini" , "Rome" , "Rovigo" , "Salerno" , "Sassari" , "Savona" , "Siena" , "Siracusa" , "Sondrio" , "Taranto" , "Teramo" , "Terni" , "Trapani" , "Trento" , "Treviso" , "Trieste" , "Turin" , "Udine" , "Varese" , "Venice" , "Verbano-Cusio-Ossola" , "Vercelli" , "Verona" , "Vibo Valentia" , "Vicenza" , "Viterbo" );
var ciArray = new Array("none");
var jmArray = new Array("none");
var jpArray = new Array("none");
var joArray = new Array("none");
var kzArray = new Array("none");
var keArray = new Array("none");
var kiArray = new Array("none");
var kwArray = new Array("none");
var kgArray = new Array("none");
var laArray = new Array("none");
var lvArray = new Array("none");
var lbArray = new Array("none");
var lsArray = new Array("none");
var lrArray = new Array("none");
var lyArray = new Array("none");
var liArray = new Array("none");
var ltArray = new Array("none");
var luArray = new Array("none");
var moArray = new Array("none");
var mkArray = new Array("none");
var mgArray = new Array("none");
var mwArray = new Array("none");
var myArray = new Array( "Johor" , "Kedah" , "Kelantan" , "Kuala Lumpur" , "Melaka" , "Negeri Sembilan" , "Pahang" , "Penang" , "Perak" , "Perlis" , "Sabah" , "Sarawak" , "Selangor" , "Terengganu" );
var mvArray = new Array("none");
var mlArray = new Array("none");
var mtArray = new Array("none");
var mhArray = new Array("none");
var mqArray = new Array("none");
var mrArray = new Array("none");
var muArray = new Array("none");
var ytArray = new Array("none");
var mxArray = new Array( "Aguascalientes" , "Baja California Sur" , "Campeche" , "Chiapas" , "Chihuahua" , "Coahuila" , "Colima" , "Distrito Federal" , "Durango" , "Guanajuato" , "Guerrero" , "Hidalgo" , "Jalisco" , "Mexico" , "Michoacan de Ocampo" , "Morelos" , "Nayarit" , "Nuevo Leon" , "Oaxaca" , "Puebla" , "Queretaro" , "Quintana Roo" , "San Luis Potosi" , "Sinaloa" , "Sonora" , "Tabasco" , "Tamaulipas" , "Tlaxcala" , "Veracruz-Llave" , "Yucatan" , "Zacatecas" );
var fmArray = new Array("none");
var mdArray = new Array("none");
var mcArray = new Array("none");
var mnArray = new Array("none");
var msArray = new Array("none");
var maArray = new Array("none");
var mzArray = new Array("none");
var mmArray = new Array("none");
var naArray = new Array("none");
var nrArray = new Array("none");
var npArray = new Array("none");
var nlArray = new Array( "Drenthe" , "Flevopolder" , "Friesland" , "Gelderland" , "Groningen" , "Limburg" , "Noord-Brahant" , "Noord-Holland" , "Overijssel" , "Utrecht" , "Zeeland" , "Zuid-Holland" );
var anArray = new Array("none");
var ntArray = new Array("none");
var ncArray = new Array("none");
var nzArray = new Array("none");
var niArray = new Array("none");
var neArray = new Array("none");
var ngArray = new Array( "Imo" , "Lagos" );
var nuArray = new Array("none");
var nfArray = new Array("none");
var kpArray = new Array("none");
var mpArray = new Array("none");
var noArray = new Array("none");
var omArray = new Array("none");
var pkArray = new Array( "Baluchistan" , "Islamabad" , "Jammu and Kashmir" , "North-West Frontier" , "Punjab" , "Sindh" );
var pwArray = new Array("none");
var paArray = new Array("none");
var pgArray = new Array("none");
var pyArray = new Array("none");
var peArray = new Array("none");
var phArray = new Array( "Abra" , "Agusan del Norte" , "Aklan" , "Albay" , "Bataan" , "Batangas" , "Benguet" , "Bohol" , "Bukidnon" , "Bulacan" , "Cagayan" , "Camarines Sur" , "Capiz" , "Cavite" , "Cebu" , "Davao" , "Davao del Sur" , "Davao Oriental" , "Ilocos Norte" , "Ilocos Sur" , "Iloilo" , "Isabela" , "La Union" , "Laguna" , "Lanao del Norte" , "Leyte" , "Manila Metropolotan Area" , "Marinduque" , "Masbate" , "Mindoro Oriental" , "Misamis Occidental" , "Misamis Oriental" , "Negros Occidental" , "Negros Oriental" , "Nueva Ecija" , "Nueva Vizcaya" , "Palawan" , "Pampanga" , "Pangasinan" , "Quezon" , "Rizal" , "Romblon" , "Samar" , "South Cotabato" , "Tarlac" , "Zambales" , "Zamboanga del Norte" , "Zamboanga del Sur" );
var pnArray = new Array("none");
var plArray = new Array("none");
var pfArray = new Array("none");
var ptArray = new Array("none");
var prArray = new Array("none");
var qaArray = new Array("none");
var reArray = new Array("none");
var roArray = new Array("none");
var ruArray = new Array("none");
var rwArray = new Array("none");
var gsArray = new Array("none");
var shArray = new Array("none");
var knArray = new Array("none");
var lcArray = new Array("none");
var pmArray = new Array("none");
var stArray = new Array("none");
var vcArray = new Array("none");
var wsArray = new Array("none");
var smArray = new Array("none");
var saArray = new Array( "Eastern Cape" , "Free State" , "Gauteng" , "KwaZulu Natal" , "Mpumalanga" , "North West" , "Northern Cape" , "Northern Province" , "Western Cape" );
var snArray = new Array("none");
var scArray = new Array("none");
var slArray = new Array("none");
var sgArray = new Array("none");
var skArray = new Array("none");
var siArray = new Array("none");
var sbArray = new Array("none");
var soArray = new Array("none");
var zaArray = new Array("none");
var krArray = new Array( "Cheju-do" , "Chollabuk-do" , "Chollanam-do" , "Chungchongbuk-do" , "Chungchongnam-do" , "Kangwon-do" , "Kyonggi-do" , "Kyongsangbuk-do" , "Kyongsangnam-do" );
var esArray = new Array( "Alava" , "Albacate" , "Alicante" , "Almeria" , "Avila" , "Badajoz" , "Barcelona" , "Burgos" , "Caceres" , "Cadiz" , "Castellon" , "Ciudad Real" , "Cuenca" , "Cordoba" , "Girona" , "Granada" , "Guadalajara" , "Guipuzcoa" , "Huelva" , "Huesca" , "Jaen" , "La Couruna" , "Las Palmas" , "Leon" , "Lerida" , "Lugo" , "Malaga" , "Orense" , "Palancia" , "Pontevedra" , "Salamanca" , "Santa Cruz de Tenerife" , "Santander" , "Segovia" , "Sevilla" , "Soria" , "Tarragona" , "Teruel" , "Toledo" , "Valencia" , "Valladolid" , "Vizcaya" , "Zamora" , "Zaragoza" );
var lkArray = new Array("none");
var sdArray = new Array("none");
var srArray = new Array("none");
var sjArray = new Array("none");
var szArray = new Array("none");
var seArray = new Array("none");
var chArray = new Array("none");
var syArray = new Array("none");
var tjArray = new Array("none");
var twArray = new Array("none");
var tzArray = new Array("none");
var thArray = new Array( "Ang Thong" , "Ayutthaya" , "Bangkok" , "Chanthaburi" , "Chiang Mai" , "Chiang Rai" , "Chon Buri" , "Chumphon" , "Kanchanaburi" , "Khon Kaen" , "Krabi" , "Lampang" , "Mae Hong Son" , "Nakhon Pathom" , "Nakhon Ratchasima" , "Nakhon Sawan" , "Nan" , "Nong Khai" , "Nonthaburi" , "Phangnga" , "Phathum Thani" , "Phayao" , "Phetchabun" , "Phetchaburi" , "Phuket" , "Prachuap Khiri Khan" , "Rayong" , "Roi Et" , "Sakon Nakhon" , "Samut Prakan" , "Samut Sakhon" , "Songkhla" , "Supan Buri" , "Surat Thani" , "Tak" , "Trang" , "Trat" , "Ubon Ratchathani" , "Ubon Thani" , "Uthai Thani" );
var tgArray = new Array("none");
var tkArray = new Array("none");
var toArray = new Array("none");
var ttArray = new Array("none");
var tnArray = new Array("none");
var trArray = new Array("none");
var tmArray = new Array("none");
var tcArray = new Array("none");
var tvArray = new Array("none");
var ugArray = new Array("none");
var uaArray = new Array("none");
var aeArray = new Array("none");
var ukArray = new Array("none");
var usArray = new Array( "Alaska" , "Alabama" , "Arkansas" , "Arizona" , "California" , "Colorado" , "Connecticut" , "Washington, DC" , "Delaware" , "Florida" , "Georgia" , "Hawaii" , "Iowa" , "Idaho" , "Illinois" , "Indiana" , "Kansas" , "Kentucky" , "Louisiana" , "Massachusetts" , "Maryland" , "Maine" , "Michigan" , "Minnesota" , "Missouri" , "Mississippi" , "Montana" , "North Carolina" , "North Dakota" , "Nebraska" , "New Hampshire" , "New Jersey" , "New Mexico" , "Nevada" , "New York" , "Ohio" , "Oklahoma" , "Oregon" , "Pennsylvania" , "Rhoda Island" , "South Carolina" , "South Dakota" , "Tennessee" , "Texas" , "Utah" , "Vermont" , "Virginia" , "Washington" , "Wisconsin" , "West Virginia" , "Wyoming" );
var uyArray = new Array("none");
var umArray = new Array("none");
var uzArray = new Array("none");
var vuArray = new Array("none");
var veArray = new Array("none");
var vnArray = new Array("none");
var vgArray = new Array("none");
var viArray = new Array("none");
var wfArray = new Array("none");
var ehArray = new Array("none");
var yeArray = new Array("none");
var yuArray = new Array("none");
var zrArray = new Array("none");
var zmArray = new Array("none");
var zwArray = new Array("none");

And then under that I have:
    <script LANGUAGE="javaScript">
function populateSTATE()
{
  var selectcountry = document.contact.country;
  var selectstate = document.contact.state;
  selectstate.options.length = 0;
  selectedArray = eval(selectcountry.value+"Array");
  if (selectedArray == -1)
    selectedArray = non_Array;

  for (var i=0; i < selectedArray.length; i++)
  {
      selectstate.options[selectstate.options.length] = new Option (selectedArray[i]);
  }
  selectstate.options[0].selected = true;
}


    </script>

But the State is not populating.   It works on some of my other sites.  Any ideas?  Or possibly a better script now?  :)  When I try to choose, the error is: document.join.country is null or not an object

Thanks!

-Corey
0
coreybryant
Asked:
coreybryant
1 Solution
 
knightEknightCommented:
do you have a form named "join" ?
0
 
knightEknightCommented:
... if so, make sure the <FORM> tags surrounds both <SELECT> elements
0
 
coreybryantAuthor Commented:
See I knew it was something easy.  I remember that now since you told me :)  Thanks!

-Corey
0
 
NetGrooveCommented:
Here are my two pence (even with long code :)

<html>
<head>
<script LANGUAGE="javaScript" SRC="country.js"></script>
<script LANGUAGE="javaScript">
function populateSTATE(theSel){
  zs = theSel.value;
  var optState = theSel.form.state.options;
  optState.length = 0;
  if(State[theSel.value]){
    for (var i=0; i<State[theSel.value].length; i++) {
      optState[optState.length] = new Option (State[zs][i], State[zs][i], true, true);
    }
  }
  theSel.form.state.selectedIndex = 0;
}
    </script>
</head>
<body>
<form name="contact">

<select NAME="country" onChange="populateSTATE(this);">
          <option VALUE>- Select Country -</option>
          <option VALUE="us">United States</option>
          <option VALUE="ca">Canada</option>
          <option VALUE="uk">United Kingdom</option>
          <option VALUE="au">Australia</option>
          <option VALUE="al">Albania</option>
          <option VALUE="dz">Algeria</option>
          <option VALUE="as">American Samoa</option>
          <option VALUE="ad">Andorra Principality of</option>
          <option VALUE="ao">Angola</option>
          <option VALUE="ai">Anguilla</option>
          <option VALUE="aq">Antarctica</option>
          <option VALUE="ag">Antigua and Barbuda</option>
          <option VALUE="ar">Argentina</option>
          <option VALUE="am">Armenia</option>
          <option VALUE="aw">Aruba</option>
          <option VALUE="au">Australia</option>
          <option VALUE="at">Austria</option>
          <option VALUE="az">Azerbaidjan</option>
          <option VALUE="bs">Bahamas</option>
          <option VALUE="bh">Bahrain</option>
          <option VALUE="bd">Bangladesh</option>
          <option VALUE="bb">Barbados</option>
          <option VALUE="by">Belarus</option>
          <option VALUE="be">Belgium</option>
          <option VALUE="bz">Belize</option>
          <option VALUE="bj">Benin</option>
          <option VALUE="bm">Bermuda</option>
          <option VALUE="bt">Bhutan</option>
          <option VALUE="bo">Bolivia</option>
          <option VALUE="ba">Bosnia-Herzegovina</option>
          <option VALUE="bw">Botswana</option>
          <option VALUE="bv">Bouvet Island</option>
          <option VALUE="br">Brazil</option>
          <option VALUE="io">British Indian Ocean Territory</option>
          <option VALUE="bn">Brunei Darussalam</option>
          <option VALUE="bg">Bulgaria</option>
          <option VALUE="bf">Burkina Faso</option>
          <option VALUE="bi">Burundi</option>
          <option VALUE="kh">Cambodia Kingdom of</option>
          <option VALUE="cm">Cameroon</option>
          <option VALUE="ca">Canada</option>
          <option VALUE="cv">Cape Verde</option>
          <option VALUE="ky">Cayman Islands</option>
          <option VALUE="cf">Central African Republic</option>
          <option VALUE="td">Chad</option>
          <option VALUE="cl">Chile</option>
          <option VALUE="cn">China</option>
          <option VALUE="cx">Christmas Island</option>
          <option VALUE="cc">Cocos (Keeling) Islands</option>
          <option VALUE="co">Colombia</option>
          <option VALUE="km">Comoros</option>
          <option VALUE="cg">Congo</option>
          <option VALUE="cd">Congo The Democratic Republic of the</option>
          <option VALUE="ck">Cook Islands</option>
          <option VALUE="cr">Costa Rica</option>
          <option VALUE="hr">Croatia</option>
          <option VALUE="cu">Cuba</option>
          <option VALUE="cy">Cyprus</option>
          <option VALUE="cz">Czech Republic</option>
          <option VALUE="dk">Denmark</option>
          <option VALUE="dj">Djibouti</option>
          <option VALUE="dm">Dominica</option>
          <option VALUE="do">Dominican Republic</option>
          <option VALUE="tp">East Timor</option>
          <option VALUE="ec">Ecuador</option>
          <option VALUE="eg">Egypt</option>
          <option VALUE="sv">El Salvador</option>
          <option VALUE="gq">Equatorial Guinea</option>
          <option VALUE="er">Eritrea</option>
          <option VALUE="ee">Estonia</option>
          <option VALUE="et">Ethiopia</option>
          <option VALUE="fk">Falkland Islands</option>
          <option VALUE="fo">Faroe Islands</option>
          <option VALUE="fj">Fiji</option>
          <option VALUE="fi">Finland</option>
          <option VALUE="cs">Former Czechoslovakia</option>
          <option VALUE="su">Former USSR</option>
          <option VALUE="fr">France</option>
          <option VALUE="fx">France (European Territory)</option>
          <option VALUE="gf">French Guyana</option>
          <option VALUE="tf">French Southern Territories</option>
          <option VALUE="ga">Gabon</option>
          <option VALUE="gm">Gambia</option>
          <option VALUE="ge">Georgia</option>
          <option VALUE="de">Germany</option>
          <option VALUE="gh">Ghana</option>
          <option VALUE="gi">Gibraltar</option>
          <option VALUE="gb">Great Britain</option>
          <option VALUE="gr">Greece</option>
          <option VALUE="gl">Greenland</option>
          <option VALUE="gd">Grenada</option>
          <option VALUE="gp">Guadeloupe (French)</option>
          <option VALUE="gu">Guam (USA)</option>
          <option VALUE="gt">Guatemala</option>
          <option VALUE="gn">Guinea</option>
          <option VALUE="gw">Guinea Bissau</option>
          <option VALUE="gy">Guyana</option>
          <option VALUE="ht">Haiti</option>
          <option VALUE="hm">Heard and McDonald Islands</option>
          <option VALUE="va">Holy See (Vatican City State)</option>
          <option VALUE="hn">Honduras</option>
          <option VALUE="hk">Hong Kong</option>
          <option VALUE="hu">Hungary</option>
          <option VALUE="is">Iceland</option>
          <option VALUE="in">India</option>
          <option VALUE="id">Indonesia</option>
          <option VALUE="ir">Iran</option>
          <option VALUE="iq">Iraq</option>
          <option VALUE="ie">Ireland</option>
          <option VALUE="il">Israel</option>
          <option VALUE="it">Italy</option>
          <option VALUE="ci">Ivory Coast (Cote D&#39;Ivoire)</option>
          <option VALUE="jm">Jamaica</option>
          <option VALUE="jp">Japan</option>
          <option VALUE="jo">Jordan</option>
          <option VALUE="kz">Kazakhstan</option>
          <option VALUE="ke">Kenya</option>
          <option VALUE="ki">Kiribati</option>
          <option VALUE="kw">Kuwait</option>
          <option VALUE="kg">Kyrgyz Republic (Kyrgyzstan)</option>
          <option VALUE="la">Laos</option>
          <option VALUE="lv">Latvia</option>
          <option VALUE="lb">Lebanon</option>
          <option VALUE="ls">Lesotho</option>
          <option VALUE="lr">Liberia</option>
          <option VALUE="ly">Libya</option>
          <option VALUE="li">Liechtenstein</option>
          <option VALUE="lt">Lithuania</option>
          <option VALUE="lu">Luxembourg</option>
          <option VALUE="mo">Macau</option>
          <option VALUE="mk">Macedonia</option>
          <option VALUE="mg">Madagascar</option>
          <option VALUE="mw">Malawi</option>
          <option VALUE="my">Malaysia</option>
          <option VALUE="mv">Maldives</option>
          <option VALUE="ml">Mali</option>
          <option VALUE="mt">Malta</option>
          <option VALUE="mh">Marshall Islands</option>
          <option VALUE="mq">Martinique (French)</option>
          <option VALUE="mr">Mauritania</option>
          <option VALUE="mu">Mauritius</option>
          <option VALUE="yt">Mayotte</option>
          <option VALUE="mx">Mexico</option>
          <option VALUE="fm">Micronesia</option>
          <option VALUE="md">Moldavia</option>
          <option VALUE="mc">Monaco</option>
          <option VALUE="mn">Mongolia</option>
          <option VALUE="ms">Montserrat</option>
          <option VALUE="ma">Morocco</option>
          <option VALUE="mz">Mozambique</option>
          <option VALUE="mm">Myanmar</option>
          <option VALUE="na">Namibia</option>
          <option VALUE="nr">Nauru</option>
          <option VALUE="np">Nepal</option>
          <option VALUE="nl">Netherlands</option>
          <option VALUE="an">Netherlands Antilles</option>
          <option VALUE="nt">Neutral Zone</option>
          <option VALUE="nc">New Caledonia (French)</option>
          <option VALUE="nz">New Zealand</option>
          <option VALUE="ni">Nicaragua</option>
          <option VALUE="ne">Niger</option>
          <option VALUE="ng">Nigeria</option>
          <option VALUE="nu">Niue</option>
          <option VALUE="nf">Norfolk Island</option>
          <option VALUE="kp">North Korea</option>
          <option VALUE="mp">Northern Mariana Islands</option>
          <option VALUE="no">Norway</option>
          <option VALUE="om">Oman</option>
          <option VALUE="pk">Pakistan</option>
          <option VALUE="pw">Palau</option>
          <option VALUE="pa">Panama</option>
          <option VALUE="pg">Papua New Guinea</option>
          <option VALUE="py">Paraguay</option>
          <option VALUE="pe">Peru</option>
          <option VALUE="ph">Philippines</option>
          <option VALUE="pn">Pitcairn Island</option>
          <option VALUE="pl">Poland</option>
          <option VALUE="pf">Polynesia (French)</option>
          <option VALUE="pt">Portugal</option>
          <option VALUE="pr">Puerto Rico</option>
          <option VALUE="qa">Qatar</option>
          <option VALUE="re">Reunion (French)</option>
          <option VALUE="ro">Romania</option>
          <option VALUE="ru">Russian Federation</option>
          <option VALUE="rw">Rwanda</option>
          <option VALUE="gs">S. Georgia &amp; S. Sandwich Isls.</option>
          <option VALUE="sh">Saint Helena</option>
          <option VALUE="kn">Saint Kitts &amp; Nevis Anguilla</option>
          <option VALUE="lc">Saint Lucia</option>
          <option VALUE="pm">Saint Pierre and Miquelon</option>
          <option VALUE="st">Saint Tome (Sao Tome) and Principe</option>
          <option VALUE="vc">Saint Vincent &amp; Grenadines</option>
          <option VALUE="ws">Samoa</option>
          <option VALUE="sm">San Marino</option>
          <option VALUE="sa">Saudi Arabia</option>
          <option VALUE="sn">Senegal</option>
          <option VALUE="sc">Seychelles</option>
          <option VALUE="sl">Sierra Leone</option>
          <option VALUE="sg">Singapore</option>
          <option VALUE="sk">Slovak Republic</option>
          <option VALUE="si">Slovenia</option>
          <option VALUE="sb">Solomon Islands</option>
          <option VALUE="so">Somalia</option>
          <option VALUE="za">South Africa</option>
          <option VALUE="kr">South Korea</option>
          <option VALUE="es">Spain</option>
          <option VALUE="lk">Sri Lanka</option>
          <option VALUE="sd">Sudan</option>
          <option VALUE="sr">Suriname</option>
          <option VALUE="sj">Svalbard and Jan Mayen Islands</option>
          <option VALUE="sz">Swaziland</option>
          <option VALUE="se">Sweden</option>
          <option VALUE="ch">Switzerland</option>
          <option VALUE="sy">Syria</option>
          <option VALUE="tj">Tadjikistan</option>
          <option VALUE="tw">Taiwan</option>
          <option VALUE="tz">Tanzania</option>
          <option VALUE="th">Thailand</option>
          <option VALUE="tg">Togo</option>
          <option VALUE="tk">Tokelau</option>
          <option VALUE="to">Tonga</option>
          <option VALUE="tt">Trinidad and Tobago</option>
          <option VALUE="tn">Tunisia</option>
          <option VALUE="tr">Turkey</option>
          <option VALUE="tm">Turkmenistan</option>
          <option VALUE="tc">Turks and Caicos Islands</option>
          <option VALUE="tv">Tuvalu</option>
          <option VALUE="ug">Uganda</option>
          <option VALUE="ua">Ukraine</option>
          <option VALUE="ae">United Arab Emirates</option>
          <option VALUE="uk">United Kingdom</option>
          <option VALUE="us">United States</option>
          <option VALUE="uy">Uruguay</option>
          <option VALUE="um">USA Minor Outlying Islands</option>
          <option VALUE="uz">Uzbekistan</option>
          <option VALUE="vu">Vanuatu</option>
          <option VALUE="ve">Venezuela</option>
          <option VALUE="vn">Vietnam</option>
          <option VALUE="vg">Virgin Islands (British)</option>
          <option VALUE="vi">Virgin Islands (USA)</option>
          <option VALUE="wf">Wallis and Futuna Islands</option>
          <option VALUE="eh">Western Sahara</option>
          <option VALUE="ye">Yemen</option>
          <option VALUE="yu">Yugoslavia</option>
          <option VALUE="zr">Zaire</option>
          <option VALUE="zm">Zambia</option>
          <option VALUE="zw">Zimbabwe</option>
          </select>

<select NAME="state">
          <option VALUE><< Select Country First</option>
</select>
</form>
</body>
</html>


country.js:
//======================================================
State = new Array();
State["al"] = ["none"];
State["dz"] = ["none"];
State["as"] = ["none"];
State["ad"] = ["none"];
State["ao"] = ["none"];
State["ai"] = ["none"];
State["aq"] = ["none"];
State["ag"] = ["none"];
State["ar"] = [ "Buenos Aires" , "Chaco" , "Chubut" , "Cordoba" , "Corrientes" , "Entre Rios" , "Jujuy" , "La Pampa" , "Mendoza" , "Misiones" ,

"Neuquen" , "Patagonia" , "Rio Negro" , "Salta" , "San Juan" , "San Luis" , "Santa Fe" , "Tierra del Fuego" , "Tucuman" ];
State["am"] = ["none"];
State["aw"] = ["none"];
State["au"] = [ "Australian Capital Territory" , "New south Wales" , "Northern Territory" , "Queensland" , "South Australia" , "Tasmania" ,

"Victoria" , "Western Australia" ];
State["at"] = [ "Burgenland" , "Carinthia" , "Lower Austria" , "Salzburg" , "Styria" , "Tyrol" , "Upper Austria" , "Vienna" , "Vorarlberg" ];
State["az"] = ["none"];
State["bs"] = ["none"];
State["bh"] = ["none"];
State["bd"] = ["none"];
State["bb"] = ["none"];
State["by"] = ["none"];
State["be"] = [ "Antwerpen" , "Flemish Brabant" , "Hainaut" , "Liege" , "Limburg" , "Luxembourg" , "Namur" , "Oost-Vlaanderen" , "Walloon Brabant"

, "West-Vlaandersn" ];
State["bz"] = ["none"];
State["bj"] = ["none"];
State["bm"] = ["none"];
State["bt"] = ["none"];
State["bo"] = ["none"];
State["ba"] = ["none"];
State["bw"] = ["none"];
State["bv"] = ["none"];
State["br"] = [ "Acre" , "Alagoas" , "Amapa" , "Amazonas" , "Bahia" , "Ceara" , "Distrito Federal" , "Espirito Santo" , "Goias" , "Maranhao" ,

"Mato Grosso" , "Mato Grosso do Sul" , "Minas Gerais" , "Parana" , "Paraiba" , "Para" , "Pernambuco" , "Piaui" , "Rio de Janeiro" , "Rio Grande do

Norte" , "Rio Grande do Sul" , "Rondonia" , "Roraima" , "Santa Catarina" , "Sergipe" , "Sao Paulo" , "Tocantins" ];
State["io"] = ["none"];
State["bn"] = ["none"];
State["bg"] = [ "Burgas" , "Grad Sofiya" , "Lovech" , "Montana" , "Plovdiv" , "Sofiya" , "Varna" ];
State["bf"] = ["none"];
State["bi"] = ["none"];
State["kh"] = ["none"];
State["cm"] = ["none"];
State["ca"] = [ "British Columbia" , "Alberta" , "Ontario" , "Manitoba" , "New Brunswick" , "Newfoundland" , "Northwest Territories" , "Nova

Scotia" , "Prince Edward Island" , "Quebec" , "Saskatchewan" , "Yukon" ];
State["cv"] = ["none"];
State["ky"] = ["none"];
State["cf"] = ["none"];
State["td"] = ["none"];
State["cl"] = [ "Antofagasta" , "Atacama" , "Biobio" , "Coquimbo" , "La Araucania" , "Libertador Gral. Bernardo O'Higgins" , "Los Lagos" ,

"Magallanes" , "Maule" , "Patagonia" , "Rapa Nui (Easter Island)" , "Santiago" , "Valparaiso" ];
State["cn"] = [ "Anhui" , "Beijing" , "Chongqing" , "Fujian" , "Gansu" , "Guangdong" , "Guangxi" , "Guizhou" , "Hainan" , "Hebei" , "Heilongjiang"

, "Henan" , "Hong Kong" , "Hubei" , "Hunan" , "Inner Mongolia" , "Jiangsu" , "Jiangxi" , "Jilin" , "Liaoning" , "Macau" , "Ningxia" , "Shaanxi" ,

"Shandong" , "Shanghai" , "Shanxi" , "Sichuan" , "Tianjin" , "Tibet" , "Xinjiang" , "Yunnan" , "Zhejiang" ];
State["cx"] = ["none"];
State["cc"] = ["none"];
State["co"] = ["none"];
State["km"] = ["none"];
State["cg"] = ["none"];
State["cd"] = ["none"];
State["ck"] = ["none"];
State["cr"] = ["none"];
State["hr"] = ["none"];
State["cu"] = [ "Ciudad de la Habana" , "Holguin" , "Isla de la Juventud" , "La Habana" , "Matanzas" ];
State["cy"] = ["none"];
State["cz"] = [ "Bohemia" , "Jihocesky" , "Jihomoravsky" , "Moravia" , "Praha" , "Severocesky" , "Severomoravsky" , "Stredocesky" , "Vychodocesky"

, "Zapadocesky" ];
State["dk"] = ["none"];
State["dj"] = ["none"];
State["dm"] = ["none"];
State["do"] = ["none"];
State["tp"] = ["none"];
State["ec"] = [ "Azuay" , "Chimborazo" , "Esmeraldas" , "Galapagos" , "Guayas" , "Imbabura" , "Loja" , "Manabi" , "Pichincha" , "Tungurahua" ];
State["eg"] = ["none"];
State["sv"] = ["none"];
State["gq"] = ["none"];
State["er"] = ["none"];
State["ee"] = ["none"];
State["et"] = ["none"];
State["fk"] = ["none"];
State["fo"] = ["none"];
State["fj"] = ["none"];
State["fi"] = ["none"];
State["cs"] = ["none"];
State["su"] = ["none"];
State["fr"] = ["none"];
State["fx"] = ["none"];
State["gf"] = ["none"];
State["tf"] = ["none"];
State["ga"] = ["none"];
State["gm"] = ["none"];
State["ge"] = ["none"];
State["de"] = [ "Baden-Wuerttemberg" , "Bavaria" , "Berlin" , "Brandenburg" , "Bremen" , "Hamburg" , "Hessen" , "Mecklenburg-Vorpommern" ,

"Niedersachsen" , "Nordrhein-Westfalen" , "Rheinland-Pfalz" , "Saarland" , "Sachsen" , "Sachsen-Anhalt" , "Schleswig-Holstein" , "Thueringen" ];
State["gh"] = ["none"];
State["gi"] = ["none"];
State["gb"] = ["none"];
State["gr"] = ["none"];
State["gl"] = ["none"];
State["gd"] = ["none"];
State["gp"] = ["none"];
State["gu"] = ["none"];
State["gt"] = ["none"];
State["gn"] = ["none"];
State["gw"] = ["none"];
State["gy"] = ["none"];
State["ht"] = ["none"];
State["hm"] = ["none"];
State["va"] = ["none"];
State["hn"] = ["none"];
State["hk"] = ["none"];
State["hu"] = ["none"];
State["is"] = ["none"];
State["in"] = [ "Andaman adn Nicobar" , "Andhra Pradesh" , "Arunachal Pradesh" , "Assam" , "Bihar" , "Chandigarh" , "Dadra and Nagar" , "Daman and

Diu" , "Delhi" , "Goa" , "Gujarat" , "Haryana" , "Himachal Pradesh" , "Jammu and Kashmir" , "Karnataka" , "Kerala" , "Lakshadweep" , "Madhya

Pradesh" , "Maharashtra" , "Manipur" , "Megahalaya" , "Mizoram" , "Nagaland" , "Orissa" , "Pondicherry" , "Punjab" , "Rajasthan" , "Sikkim" ,

"Tamil Nadu" , "Tripura" , "Uttar Pradesh" , "West Bengal" ];
State["id"] = [ "Bali" , "Irian Jaya" , "Jawa Barat" , "Jawa Tengah" , "Jawa Timur" , "Kalimantan Timur" , "Lampung" , "Maluku" , "Nusa Tenggara

Barat" , "Nusa Tenggara Timur" , "Riau" , "Sulawesi Utara" , "Sumatera Utara" , "Timor Timur" , "Yogyakarta" ];
State["ir"] = ["none"];
State["iq"] = ["none"];
State["ie"] = ["none"];
State["il"] = ["none"];
State["it"] = [ "Agrigento" , "Alessandria" , "Ancona" , "Aosta" , "Arezzo" , "Ascoli Piceno" , "Asti" , "Avellino" , "Bari" , "Belluno" ,

"Bergamo" , "Biella" , "Bologna" , "Bolzano" , "Brescia" , "Cagliari" , "Campobasso" , "Catania" , "Catanzaro" , "Chieti" , "Como" , "Cosenza" ,

"Cremona" , "Cuneo" , "Ferrara" , "Florence" , "Foggia" , "Forli-Cesena" , "Frosinone" , "Genoa" , "Gorizia" , "Grosseto" , "Imperia" , "L'Aquila"

, "La Spezia" , "Latina" , "L'Aquila" , "La Spezia" , "Latina" , "Lecco" , "Livorno" , "Lodi" , "Lucca" , "Macerata" , "Mantua" , "Massa-Carrara"

, "Matera" , "Messina" , "Milan" , "Modena" , "Naples" , "Navara" , "Nuoro" , "Oristano" , "Padua" , "Palermo" , "Parma" , "Pavia" , "Perugia" ,

"Pesaro e Urbino" , "Pescara" , "Piacenza" , "Pisa" , "Pistoia" , "Pordenone" , "Potenza" , "Prato" , "Ragusa" , "Ravenna" , "Reggio Calabria" ,

"Reggio Emilia" , "Rieti" , "Rimini" , "Rome" , "Rovigo" , "Salerno" , "Sassari" , "Savona" , "Siena" , "Siracusa" , "Sondrio" , "Taranto" ,

"Teramo" , "Terni" , "Trapani" , "Trento" , "Treviso" , "Trieste" , "Turin" , "Udine" , "Varese" , "Venice" , "Verbano-Cusio-Ossola" , "Vercelli"

, "Verona" , "Vibo Valentia" , "Vicenza" , "Viterbo" ];
State["ci"] = ["none"];
State["jm"] = ["none"];
State["jp"] = ["none"];
State["jo"] = ["none"];
State["kz"] = ["none"];
State["ke"] = ["none"];
State["ki"] = ["none"];
State["kw"] = ["none"];
State["kg"] = ["none"];
State["la"] = ["none"];
State["lv"] = ["none"];
State["lb"] = ["none"];
State["ls"] = ["none"];
State["lr"] = ["none"];
State["ly"] = ["none"];
State["li"] = ["none"];
State["lt"] = ["none"];
State["lu"] = ["none"];
State["mo"] = ["none"];
State["mk"] = ["none"];
State["mg"] = ["none"];
State["mw"] = ["none"];
State["my"] = [ "Johor" , "Kedah" , "Kelantan" , "Kuala Lumpur" , "Melaka" , "Negeri Sembilan" , "Pahang" , "Penang" , "Perak" , "Perlis" ,

"Sabah" , "Sarawak" , "Selangor" , "Terengganu" ];
State["mv"] = ["none"];
State["ml"] = ["none"];
State["mt"] = ["none"];
State["mh"] = ["none"];
State["mq"] = ["none"];
State["mr"] = ["none"];
State["mu"] = ["none"];
State["yt"] = ["none"];
State["mx"] = [ "Aguascalientes" , "Baja California Sur" , "Campeche" , "Chiapas" , "Chihuahua" , "Coahuila" , "Colima" , "Distrito Federal" ,

"Durango" , "Guanajuato" , "Guerrero" , "Hidalgo" , "Jalisco" , "Mexico" , "Michoacan de Ocampo" , "Morelos" , "Nayarit" , "Nuevo Leon" , "Oaxaca"

, "Puebla" , "Queretaro" , "Quintana Roo" , "San Luis Potosi" , "Sinaloa" , "Sonora" , "Tabasco" , "Tamaulipas" , "Tlaxcala" , "Veracruz-Llave" ,

"Yucatan" , "Zacatecas" ];
State["fm"] = ["none"];
State["md"] = ["none"];
State["mc"] = ["none"];
State["mn"] = ["none"];
State["ms"] = ["none"];
State["ma"] = ["none"];
State["mz"] = ["none"];
State["mm"] = ["none"];
State["na"] = ["none"];
State["nr"] = ["none"];
State["np"] = ["none"];
State["nl"] = [ "Drenthe" , "Flevopolder" , "Friesland" , "Gelderland" , "Groningen" , "Limburg" , "Noord-Brahant" , "Noord-Holland" ,

"Overijssel" , "Utrecht" , "Zeeland" , "Zuid-Holland" ];
State["an"] = ["none"];
State["nt"] = ["none"];
State["nc"] = ["none"];
State["nz"] = ["none"];
State["ni"] = ["none"];
State["ne"] = ["none"];
State["ng"] = [ "Imo" , "Lagos" ];
State["nu"] = ["none"];
State["nf"] = ["none"];
State["kp"] = ["none"];
State["mp"] = ["none"];
State["no"] = ["none"];
State["om"] = ["none"];
State["pk"] = [ "Baluchistan" , "Islamabad" , "Jammu and Kashmir" , "North-West Frontier" , "Punjab" , "Sindh" ];
State["pw"] = ["none"];
State["pa"] = ["none"];
State["pg"] = ["none"];
State["py"] = ["none"];
State["pe"] = ["none"];
State["ph"] = [ "Abra" , "Agusan del Norte" , "Aklan" , "Albay" , "Bataan" , "Batangas" , "Benguet" , "Bohol" , "Bukidnon" , "Bulacan" , "Cagayan"

, "Camarines Sur" , "Capiz" , "Cavite" , "Cebu" , "Davao" , "Davao del Sur" , "Davao Oriental" , "Ilocos Norte" , "Ilocos Sur" , "Iloilo" ,

"Isabela" , "La Union" , "Laguna" , "Lanao del Norte" , "Leyte" , "Manila Metropolotan Area" , "Marinduque" , "Masbate" , "Mindoro Oriental" ,

"Misamis Occidental" , "Misamis Oriental" , "Negros Occidental" , "Negros Oriental" , "Nueva Ecija" , "Nueva Vizcaya" , "Palawan" , "Pampanga" ,

"Pangasinan" , "Quezon" , "Rizal" , "Romblon" , "Samar" , "South Cotabato" , "Tarlac" , "Zambales" , "Zamboanga del Norte" , "Zamboanga del Sur"

];
State["pn"] = ["none"];
State["pl"] = ["none"];
State["pf"] = ["none"];
State["pt"] = ["none"];
State["pr"] = ["none"];
State["qa"] = ["none"];
State["re"] = ["none"];
State["ro"] = ["none"];
State["ru"] = ["none"];
State["rw"] = ["none"];
State["gs"] = ["none"];
State["sh"] = ["none"];
State["kn"] = ["none"];
State["lc"] = ["none"];
State["pm"] = ["none"];
State["st"] = ["none"];
State["vc"] = ["none"];
State["ws"] = ["none"];
State["sm"] = ["none"];
State["sa"] = [ "Eastern Cape" , "Free State" , "Gauteng" , "KwaZulu Natal" , "Mpumalanga" , "North West" , "Northern Cape" , "Northern Province"

, "Western Cape" ];
State["sn"] = ["none"];
State["sc"] = ["none"];
State["sl"] = ["none"];
State["sg"] = ["none"];
State["sk"] = ["none"];
State["si"] = ["none"];
State["sb"] = ["none"];
State["so"] = ["none"];
State["za"] = ["none"];
State["kr"] = [ "Cheju-do" , "Chollabuk-do" , "Chollanam-do" , "Chungchongbuk-do" , "Chungchongnam-do" , "Kangwon-do" , "Kyonggi-do" ,

"Kyongsangbuk-do" , "Kyongsangnam-do" ];
State["es"] = [ "Alava" , "Albacate" , "Alicante" , "Almeria" , "Avila" , "Badajoz" , "Barcelona" , "Burgos" , "Caceres" , "Cadiz" , "Castellon" ,

"Ciudad Real" , "Cuenca" , "Cordoba" , "Girona" , "Granada" , "Guadalajara" , "Guipuzcoa" , "Huelva" , "Huesca" , "Jaen" , "La Couruna" , "Las

Palmas" , "Leon" , "Lerida" , "Lugo" , "Malaga" , "Orense" , "Palancia" , "Pontevedra" , "Salamanca" , "Santa Cruz de Tenerife" , "Santander" ,

"Segovia" , "Sevilla" , "Soria" , "Tarragona" , "Teruel" , "Toledo" , "Valencia" , "Valladolid" , "Vizcaya" , "Zamora" , "Zaragoza" ];
State["lk"] = ["none"];
State["sd"] = ["none"];
State["sr"] = ["none"];
State["sj"] = ["none"];
State["sz"] = ["none"];
State["se"] = ["none"];
State["ch"] = ["none"];
State["sy"] = ["none"];
State["tj"] = ["none"];
State["tw"] = ["none"];
State["tz"] = ["none"];
State["th"] = [ "Ang Thong" , "Ayutthaya" , "Bangkok" , "Chanthaburi" , "Chiang Mai" , "Chiang Rai" , "Chon Buri" , "Chumphon" , "Kanchanaburi" ,

"Khon Kaen" , "Krabi" , "Lampang" , "Mae Hong Son" , "Nakhon Pathom" , "Nakhon Ratchasima" , "Nakhon Sawan" , "Nan" , "Nong Khai" , "Nonthaburi" ,

"Phangnga" , "Phathum Thani" , "Phayao" , "Phetchabun" , "Phetchaburi" , "Phuket" , "Prachuap Khiri Khan" , "Rayong" , "Roi Et" , "Sakon Nakhon" ,

"Samut Prakan" , "Samut Sakhon" , "Songkhla" , "Supan Buri" , "Surat Thani" , "Tak" , "Trang" , "Trat" , "Ubon Ratchathani" , "Ubon Thani" ,

"Uthai Thani" ];
State["tg"] = ["none"];
State["tk"] = ["none"];
State["to"] = ["none"];
State["tt"] = ["none"];
State["tn"] = ["none"];
State["tr"] = ["none"];
State["tm"] = ["none"];
State["tc"] = ["none"];
State["tv"] = ["none"];
State["ug"] = ["none"];
State["ua"] = ["none"];
State["ae"] = ["none"];
State["uk"] = ["none"];
State["us"] = [ "Alaska" , "Alabama" , "Arkansas" , "Arizona" , "California" , "Colorado" , "Connecticut" , "Washington, DC" , "Delaware" ,

"Florida" , "Georgia" , "Hawaii" , "Iowa" , "Idaho" , "Illinois" , "Indiana" , "Kansas" , "Kentucky" , "Louisiana" , "Massachusetts" , "Maryland"

, "Maine" , "Michigan" , "Minnesota" , "Missouri" , "Mississippi" , "Montana" , "North Carolina" , "North Dakota" , "Nebraska" , "New Hampshire" ,

"New Jersey" , "New Mexico" , "Nevada" , "New York" , "Ohio" , "Oklahoma" , "Oregon" , "Pennsylvania" , "Rhoda Island" , "South Carolina" , "South

Dakota" , "Tennessee" , "Texas" , "Utah" , "Vermont" , "Virginia" , "Washington" , "Wisconsin" , "West Virginia" , "Wyoming" ];
State["uy"] = ["none"];
State["um"] = ["none"];
State["uz"] = ["none"];
State["vu"] = ["none"];
State["ve"] = ["none"];
State["vn"] = ["none"];
State["vg"] = ["none"];
State["vi"] = ["none"];
State["wf"] = ["none"];
State["eh"] = ["none"];
State["ye"] = ["none"];
State["yu"] = ["none"];
State["zr"] = ["none"];
State["zm"] = ["none"];
State["zw"] = ["none"];


0
 
James RodgersWeb Applications DeveloperCommented:
you might want to take alook at the way this one is broken down to shorten the select lists, the people here are doing a similr process but have broken it down by continent|country|state|city

http://www.abc-of-travel.com/travelpartners/test10.asp

i wouldn't recommend you use the array structure they use but just an idea on how to shorten your select lists
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now