ec_multiple_state_widget

one of the documented procedures in this installation of the ACS
Usage:
ec_multiple_state_widget   db   { default_list "" }   { select_name "usps_abbrev" }
What it does:
Returns a state multiple selection box of size 5
Defined in: /web/philip/tcl/ecommerce-widgets.tcl

Source code:



    set widget_value "<select multiple name=\"$select_name\" size=5>\n"
    set selection [ns_db select $db "select * from states order by state_name"]
    while { [ns_db getrow $db $selection] } {
        set_variables_after_query
        if { [lsearch $default_list $usps_abbrev] != -1 } {
            append widget_value "<option value=\"$usps_abbrev\" SELECTED>$state_name</option>\n" 
        } else {            
            append widget_value "<option value=\"$usps_abbrev\">$state_name</option>\n"
        }
    }
    append widget_value "</select>\n"
    return $widget_value


philg@mit.edu