IPPC Design Docs / Country Selector

Country Selector

Updated: Tuesday, 27 October 2009

In global.js or HTML page head (This script is in global.js in the test site. Just remember to change var baseurl to point to the production site when we go live ):

<script type="text/javascript" charset="utf-8">
  function menu_goto( menuform )
  {
      var baseurl = "http://193.43.36.147/ippctypo3_test/index.php?id=nppo" ; // base URL for value in <select value="">
      
      selecteditem = menuform.countryurl.selectedIndex ;
      countryurl = menuform.countryurl.options[ selecteditem ].value ;
      if (countryurl.length != 0) {
        location.href = baseurl + countryurl ;
      }
  }
  </script>

In HTML page body:

<form action="">
    <select name="countryurl" class="countrydropdown" title="Click, type country name, press Enter" onchange="menu_goto(this.form)">
    <option selected="selected" value="">Select Country:</option>
      
      <option value="AFG">Afghanistan [AFG]</option>  <option value="ALB">Albania [ALB]</option>  <option value="DZA">Algeria [DZA]</option> <option value="ASM">American Samoa [ASM]</option> <option value="AND">Andorra [AND]</option> <option value="AGO">Angola [AGO]</option> <option value="AIA">Anguilla [AIA]</option> <option value="ATG">Antigua and Barbuda [ATG]</option> <option value="ARG">Argentina [ARG]</option> <option value="ARM">Armenia [ARM]</option> <option value="ABW">Aruba [ABW]</option> <option value="AUS">Australia [AUS]</option> <option value="AUT">Austria [AUT]</option> <option value="AZE">Azerbaijan [AZE]</option> <option value="BHS">Bahamas [BHS]</option> <option value="BHR">Bahrain [BHR]</option> <option value="BGD">Bangladesh [BGD]</option> <option value="BRB">Barbados [BRB]</option> <option value="BLR">Belarus [BLR]</option> <option value="BEL">Belgium [BEL]</option> <option value="BLZ">Belize [BLZ]</option> <option value="BEN">Benin [BEN]</option> <option value="BMU">Bermuda [BMU]</option> <option value="BTN">Bhutan [BTN]</option> <option value="BOL">Bolivia, Plurinational State of [BOL]</option> <option value="BIH">Bosnia and Herzegovina [BIH]</option> <option value="BWA">Botswana [BWA]</option> <option value="BRA">Brazil [BRA]</option> <option value="BRN">Brunei Darussalam [BRN]</option> <option value="BGR">Bulgaria [BGR]</option> <option value="BFA">Burkina Faso [BFA]</option> <option value="BDI">Burundi [BDI]</option> <option value="CIV">Côte d'Ivoire [CIV]</option> <option value="KHM">Cambodia [KHM]</option> <option value="CMR">Cameroon [CMR]</option> <option value="CAN">Canada [CAN]</option> <option value="CPV">Cape Verde [CPV]</option> <option value="CYM">Cayman Inslands [CYM]</option> <option value="CAF">Central African Republic [CAF]</option> <option value="TCD">Chad [TCD]</option> <option value="CHL">Chile [CHL]</option> <option value="CHN">China [CHN]</option> <option value="COL">Colombia [COL]</option> <option value="COM">Comoros [COM]</option> <option value="COG">Congo [COG]</option> <option value="COD">Congo, The Democratic Republic of the [COD]</option> <option value="COK">Cook Islands [COK]</option> <option value="CRI">Costa Rica [CRI]</option> <option value="HRV">Croatia [HRV]</option> <option value="CUB">Cuba [CUB]</option> <option value="CYP">Cyprus [CYP]</option> <option value="CZE">Czech Republic [CZE]</option> <option value="DNK">Denmark [DNK]</option> <option value="DJI">Djibouti [DJI]</option> <option value="">Dominica [DMA]</option> <option value="DOM">Dominican Republic [DOM]</option> <option value="DOM">Ecuador [DOM]</option> <option value="EGY">Egypt [EGY]</option> <option value="SLV">El Salvador [SLV]</option> <option value="GNQ">Equatorial Guinea [GNQ]</option> <option value="ERI">Eritrea [ERI]</option> <option value="EST">Estonia [EST]</option> <option value="ETH">Ethiopia [ETH]</option> <option value="EU">European Union [EU]</option> <option value="FLK">Falkland Islands [FLK]</option> <option value="FRO">Faroe Islands [FRO]</option> <option value="FJI">Fiji [FJI]</option> <option value="FIN">Finland [FIN]</option> <option value="FRA">France [FRA]</option> <option value="GUF">French Guiana [GUF]</option> <option value="PYF">French Polynesia [PYF]</option> <option value="ATF">French Southern Territories [ATF]</option> <option value="GAB">Gabon [GAB]</option> <option value="GMB">Gambia [GMB]</option> <option value="GEO">Georgia [GEO]</option> <option value="DEU">Germany [DEU]</option> <option value="GHA">Ghana [GHA]</option> <option value="GIB">Gibraltar [GIB]</option> <option value="GRC">Greece [GRC]</option> <option value="GRL">Greenland [GRL]</option> <option value="GRD">Grenada [GRD]</option> <option value="GLP">Guadeloupe [GLP]</option> <option value="GUM">Guam [GUM]</option> <option value="GTM">Guatemala [GTM]</option> <option value="GGY">Guernsey [GGY]</option> <option value="GIN">Guinea [GIN]</option> <option value="GNB">Guinea-Bissau [GNB]</option> <option value="GUY">Guyana [GUY]</option> <option value="HTI">Haiti [HTI]</option> <option value="VAT">Holy See [VAT]</option> <option value="HND">Honduras [HND]</option> <option value="HUN">Hungary [HUN]</option> <option value="ISL">Iceland [ISL]</option> <option value="IND">India [IND]</option> <option value="IDN">Indonesia [IDN]</option> <option value="IRN">Iran, Islamic Republic of [IRN]</option> <option value="IRQ">Iraq [IRQ]</option> <option value="IRL">Ireland [IRL]</option> <option value="ISR">Israel [ISR]</option> <option value="ITA">Italy [ITA]</option> <option value="JAM">Jamaica [JAM]</option> <option value="JPN">Japan [JPN]</option> <option value="JEY">Jersey [JEY]</option> <option value="JOR">Jordan [JOR]</option> <option value="KAZ">Kazakhstan [KAZ]</option> <option value="KEN">Kenya [KEN]</option> <option value="KIR">Kiribati [KIR]</option> <option value="PRK">Korea, Democratic People's Republic of [PRK]</option> <option value="KOR">Korea, Republic of [KOR]</option> <option value="KWT">Kuwait [KWT]</option> <option value="KGZ">Kyrgyzstan [KGZ]</option> <option value="LAO">Lao People's Democratic Republic [LAO]</option> <option value="LVA">Latvia [LVA]</option> <option value="LBN">Lebanon [LBN]</option> <option value="LSO">Lesotho [LSO]</option> <option value="LBR">Liberia [LBR]</option> <option value="LBY">Libyan Arab Jamahiriya [LBY]</option> <option value="LIE">Liechtenstein [LIE]</option> <option value="LTU">Lithuania [LTU]</option> <option value="LUX">Luxembourg [LUX]</option> <option value="MKD">Macedonia, the former Yugoslav Republic of [MKD]</option> <option value="MDG">Madagascar [MDG]</option> <option value="MWI">Malawi [MWI]</option> <option value="MYS">Malaysia [MYS]</option> <option value="MDV">Maldives [MDV]</option> <option value="MLI">Mali [MLI]</option> <option value="MLT">Malta [MLT]</option> <option value="MHL">Marshall Islands [MHL]</option> <option value="MTQ">Martinique [MTQ]</option> <option value="MRT">Mauritania [MRT]</option> <option value="MUS">Mauritius [MUS]</option> <option value="MEX">Mexico [MEX]</option> <option value="FSM">Micronesia, Federated States of [FSM]</option> <option value="MDA">Moldova, Republic of [MDA]</option> <option value="MCO">Monaco [MCO]</option> <option value="MNG">Mongolia [MNG]</option> <option value="MNE">Montenegro [MNE]</option> <option value="MSR">Montserrat [MSR]</option> <option value="MAR">Morocco [MAR]</option> <option value="MOZ">Mozambique [MOZ]</option> <option value="MMR">Myanmar [MMR]</option> <option value="NAM">Namibia [NAM]</option> <option value="NRU">Nauru [NRU]</option> <option value="NPL">Nepal [NPL]</option> <option value="NLD">Netherlands [NLD]</option> <option value="ANT">Netherlands Antilles [ANT]</option> <option value="NCL">New Caledonia [NCL]</option> <option value="NZL">New Zealand [NZL]</option> <option value="NIC">Nicaragua [NIC]</option> <option value="NER">Niger [NER]</option> <option value="NGA">Nigeria [NGA]</option> <option value="NIU">Niue [NIU]</option> <option value="MNP">Northern Mariana Islands [MNP]</option> <option value="NOR">Norway [NOR]</option> <option value="OMN">Oman [OMN]</option> <option value="PAK">Pakistan [PAK]</option> <option value="PLW">Palau [PLW]</option> <option value="PAN">Panama [PAN]</option> <option value="PNG">Papua New Guinea [PNG]</option> <option value="PRY">Paraguay [PRY]</option> <option value="PER">Peru [PER]</option> <option value="PHL">Philippines [PHL]</option> <option value="POL">Poland [POL]</option> <option value="PRT">Portugal [PRT]</option> <option value="PRI">Puerto Rico [PRI]</option> <option value="QAT">Qatar [QAT]</option> <option value="REU">Réunion [REU]</option> <option value="ROM">Romania [ROM]</option> <option value="RUS">Russian Federation [RUS]</option> <option value="RWA">Rwanda [RWA]</option> <option value="SHN">Saint Helena [SHN]</option> <option value="KNA">Saint Kitts And Nevis [KNA]</option> <option value="LCA">Saint Lucia [LCA]</option> <option value="SPM">Saint Pierre and Miquelon [SPM]</option> <option value="VCT">Saint Vincent and The Grenadines [VCT]</option> <option value="WSM">Samoa [WSM]</option> <option value="SMR">San Marino [SMR]</option> <option value="STP">Sao Tome and Principe [STP]</option> <option value="SAU">Saudi Arabia [SAU]</option> <option value="SEN">Senegal [SEN]</option> <option value="SRB">Serbia [SRB]</option> <option value="SYC">Seychelles [SYC]</option> <option value="SLE">Sierra Leone [SLE]</option> <option value="SGP">Singapore [SGP]</option> <option value="SVK">Slovakia [SVK]</option> <option value="SVN">Slovenia [SVN]</option> <option value="SLB">Solomon Islands [SLB]</option> <option value="SOM">Somalia [SOM]</option> <option value="ZAF">South Africa [ZAF]</option> <option value="ESP">Spain [ESP]</option> <option value="LKA">Sri Lanka [LKA]</option> <option value="SDN">Sudan [SDN]</option> <option value="SUR">Suriname [SUR]</option> <option value="SWZ">Swaziland [SWZ]</option> <option value="SWE">Sweden [SWE]</option> <option value="CHE">Switzerland [CHE]</option> <option value="SYR">Syrian Arab Republic [SYR]</option> <option value="TJK">Tajikistan [TJK]</option> <option value="TZA">Tanzania, United Republic of [TZA]</option> <option value="THA">Thailand [THA]</option> <option value="TLS">Timor-Leste [TLS]</option> <option value="TGO">Togo [TGO]</option> <option value="TKL">Tokelau [TKL]</option> <option value="TON">Tonga [TON]</option> <option value="TTO">Trinidad and Tobago [TTO]</option> <option value="TUN">Tunisia [TUN]</option> <option value="TUR">Turkey [TUR]</option> <option value="TKM">Turkmenistan [TKM]</option> <option value="TCA">Turks and Caicos Islands [TCA]</option> <option value="TUV">Tuvalu [TUV]</option> <option value="UGA">Uganda [UGA]</option> <option value="UKR">Ukraine [UKR]</option> <option value="ARE">United Arab Emirates [ARE]</option> <option value="GBR">United Kingdom [GBR]</option> <option value="USA">United States of America [USA]</option> <option value="URY">Uruguay [URY]</option> <option value="UZB">Uzbekistan [UZB]</option> <option value="VUT">Vanuatu [VUT]</option> <option value="VEN">Venezuela, Bolivarian Republic of [VEN]</option> <option value="VNM">Viet Nam [VNM]</option> <option value="VGB">Virgin Islands, British [VGB]</option> <option value="VIR">Virgin Islands, U.S. [VIR]</option> <option value="WLF">Wallis and Futuna Islands [WLF]</option> <option value="YEM">Yemen [YEM]</option> <option value="ZMB">Zambia [ZMB]</option> <option value="ZWE">Zimbabwe [ZWE]</option>
      
    </select>
  </form>