BrowserHawk IQ now available! Click here for the full scoop!
Search:
Can I change the order of countries listed when using the getSelectList method?
Created: 8/20/2002    Updated: 8/20/2002
Q   I've noticed that by default the HTML drop down selection list created by CountryHawk's getSelectList method lists the United States and Canada at the top of the list. How can I change this?

A   Yes, this is completely configurable. First, you can use one of the getSelectList method's parameters to pass in a list of countries you want included in the drop down list, and the order you specify is the same as the order CountryHawk will list the countries in.

Even easier, however, is that you can define this globally by customizing your countries.properties file. Here are the notes directly from that file.

# Countries to display in an HTML form select list
# This property lists the countries that should be represented in the 
# auto-generated HTML select component retrieved by getSelectList().  
# Countries are given by their ISO 3166 2-letter abbreviations but are shown
# using their full display names (see the previous property).  The ISO 3166
# mapping can be found at http://www.iana.org/cctld/cctld-whois.htm.
# An "XX" entry means "Other" should be given as an option.  Countries are 
# displayed in the order listed here, allowing you to put commonly selected
# countries at the top.  The default value below lists all countries in
# alphabetical order except for the United States and Canada which are 
# listed first.
select.hosts=US CA AF AL DZ (snip)
Note that after changing this file you must restart your web services for the new changes to take affect.

    FAQ Home  |  Search FAQ  |  Show New Items  |  Ask a FAQ  |  Notify Me  |  Most Popular     
 
 
Copyright © 1994-2020 cyScape, Inc. All Rights Reserved. ()
ASP, ASP.NET, ColdFusion MX, CFMX, JSP, PHP