If -multi is specified, the SELECT will be generated with the MULTIPLE attribute to allow multiple options to be selected.
If -sort is specified, the labels (if specified) or values (if labels are not specified) will be sorted in the option list of the SELECT.
The labels argument is a list of labels that you want to display in place of the values for the SELECT. The order and number of the labels list must match the order and number of the values list.
The key argument specifies the NAME attribute of the SELECT.
The values argument is a list of the OPTIONs for the SELECT. If a labels list is not specified, the values themselves will be used as the option labels.
The selecteddata argument specifies the value (or values, if -multi is specified) that is to be selected by default.
set foo [ns_htmlselect -sort animal {cat rat mouse} rat]
The result of the above command will be:
<SELECT NAME=animal> <OPTION VALUE="cat">cat <OPTION VALUE="mouse">mouse <OPTION VALUE="rat" SELECTED>rat </SELECT>