bug-cgicc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: select() and option() bug?


From: Stephen F. Booth
Subject: RE: select() and option() bug?
Date: Thu, 6 Sep 2001 18:16:41 -0400

The option() class is a boolean element class which has an internal on/off
state.  If you don't specify the text to enclose in the constructor, it will
write itself in the current state and the flip-flop.

You can write the code you want 2 different ways.  This way is cleaner (and
faster):

<< option("Male").set("value", "M")

but you could also write

<< option().set("value", "M") << "Male" << option()

-Stephen

> This doesn't seem to work properly:
>
> << select().set("name", "gender")
>     << option().set("value", "M") << "Male"
>     << option().set("value", "F") << "Female"
>     << option().set("value", "B") << "Both"
>     << option().set("value", "N") << "Neither"
> << select()
>
> Two of the option tags are left out.
>
> Is this a known bug or am I doing this wrong?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]