db_html_select_options (public)

 db_html_select_options [ -bind bind ] [ -select_option select_option ] \
    stmt_name sql

Defined in packages/acs-tcl/tcl/utilities-procs.tcl

Generate html option tags for an HTML selection widget. If select_option is passed, this option will be marked as selected.

Switches:
-bind (optional)
-select_option (optional)
Parameters:
stmt_name (required)
sql (required)
Author:
yon [yon@arsdigita.com]

Partial Call Graph (max 5 caller/called nodes):
%3 db_list db_list (public) db_html_select_options db_html_select_options db_html_select_options->db_list

Testcases:
No testcase defined.
Source code:

    set select_options ""

    if { $bind ne "" } {
        set options [db_list $stmt_name $sql -bind $bind]
    } else {
        set options [db_list $stmt_name $sql]
    }

    foreach option $options {
        if { $option eq $select_option  } {
            append select_options "<option selected=\"selected\">$option</option>\n"
        } else {
            append select_options "<option>$option</option>\n"
        }
    }
    return $select_options
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-tcl/tcl/utilities-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: