currency_widget

one of the documented procedures in this installation of the ACS
Usage:
currency_widget   db   { default "" }   { select_name "currency_code" }   { size_subtag "size=4" }
What it does:
Returns a currency 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=\"\">Currency</option>
<option value=\"USD\" SELECTED>United States Dollar</option>\n"
	} else {
	    append widget_value "<option value=\"\" SELECTED>Currency</option>\n"
	}
    }
    set selection [ns_db select $db "select currency_name, iso 
                                     from currency_codes 
                                     where supported_p='t'
                                     order by currency_name"]
     while { [ns_db getrow $db $selection] } {
        set_variables_after_query
        if { $default == $iso } {
            append widget_value "<option value=\"$iso\" SELECTED>$currency_name</option>\n" 
        } else {            
            append widget_value "<option value=\"$iso\">$currency_name</option>\n"
        }
    }
    append widget_value "</select>\n"
    return $widget_value


philg@mit.edu