ec_generic_html_form_select_widget

one of the documented procedures in this installation of the ACS
Usage:
ec_generic_html_form_select_widget   name_of_select   option_spec_list   { default "" }
What it does:
This is a generalization of all the other widgets we have that create HTML select lists. You can use this directly in your HTML code, but I have tended to use it inside of other procs to just more quickly create the widget.
Defined in: /web/philip/tcl/ecommerce-widgets.tcl

Source code:


    set header "<select name=$name_of_select>\n"
    set footer "</select>\n"
    set defaulted_flag 0
    foreach option_spec $option_spec_list {
	set size_for_db [lindex $option_spec 0]
	set size [lindex $option_spec 1]
	if { [string compare $size $default] == 0 || [string compare $size_for_db $default] == 0 } {
	    append options "<option value=\"$size_for_db\" SELECTED>$size\n"
	    set defaulted_flag 1
	} else {
	    append options "<option value=\"$size_for_db\">$size\n"
	}
    }
    if $defaulted_flag {
	return "$header$options$footer"
    } else {
	return "${header}<option value=\"\" SELECTED>select\n$options$footer"
    }


philg@mit.edu