country_widget

one of the documented procedures in this installation of the ACS
Usage:
country_widget   db   { default "" }   { select_name "country_code" }   { size_subtag "size=4" }
What it does:
Returns a country selection box
Defined in: /web/philip/packages/acs-core/widgets-procs.tcl

Source code:



    set widget_value "<select name=\"$select_name\" $size_subtag>\n"
    if { $default == "" } {
        if [ad_parameter SomeAmericanReadersP] {
	    append widget_value "<option value=\"\">Choose a Country</option>
<option value=\"us\" SELECTED>United States</option>\n"
	} else {
	    append widget_value "<option value=\"\" SELECTED>Choose a Country</option>\n"
	}
    }
    set selection [ns_db select $db "select country_name, iso from country_codes order by country_name"]
     while { [ns_db getrow $db $selection] } {
        set_variables_after_query
        if { $default == $iso } {
            append widget_value "<option value=\"$iso\" SELECTED>$country_name</option>\n" 
        } else {            
            append widget_value "<option value=\"$iso\">$country_name</option>\n"
        }
    }
    append widget_value "</select>\n"
    return $widget_value


philg@mit.edu