code_for_select

one of the documented procedures in this installation of the ACS
Usage:
code_for_select   column   list_of_vals   items
What it does:
Helper proc to make-form that makes a selectbox for edit page code
Defined in: /web/philip/tcl/prototype-defs.tcl

Source code:


    #An annoying problem: if my list_of_vals or items contains quotes,
    #they will cause troubles for the ns_writes. They need backslashes
    #(Actually I'm not sure I need this, so I commented out this bit)
    #regsub -all "\"" $list_of_vals "\\\"" fixed_list
    #regsub -all "\"" $items "\\\"" fixed_items
    #In any case the quote_double_quotes is definitely needed.

    set form_html "<td><select name=$column>\n"
    append form_html "\[ad_generic_optionlist \\\n    \{ $list_of_vals\} \\\n    \{$items\} \\\n    \$$column\]"
    append form_html "\n</select></td>\n"
    set merged_html "\[bt_mergepiece \"$form_html\" \$selection\]\n"
    return $merged_html


philg@mit.edu