You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-user@tcl.apache.org by Don Bowman <do...@sandvine.com> on 2004/03/18 22:12:18 UTC

Formvar with multiple select

If you have a form like this:

            <FORM METHOD=POST>
            Possible Criteria<BR>
            <SELECT NAME="possibleCriteria" SIZE="5" MULTIPLE>
            <OPTION VALUE="V1 a">V1 a</OPTION>
            <OPTION VALUE="V2 a">V2 a</OPTION>
            <OPTION VALUE="V3 a">V3 a</OPTION>
            </SELECT>
            <INPUT TYPE="submit" value="submit">
            </FORM>

when you do, with websh:

set n [web::formvar possibleCriteria]

$n will have either:

"V1 a"
or 
"{V1 a} {V2 a}"

both have llength 2

in it, and in the tcl code, you can't differentiate whether you
picked two list items, or 1 list item.

I think it needs to always be a list, so that llength == number
of items picked.

Suggestions?


---------------------------------------------------------------------
To unsubscribe, e-mail: websh-user-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-user-help@tcl.apache.org