
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] [or] tag problems
Quoting JT Justman (jt@signless.com):
> Okay, I tried to search this on the mailing list archive, but "or" is not
> indexed, and nothing relivant was found under all the related phrases I
> could think of. There is nearly no info on [or] in the docs.
>
> I'm doing a simple check:
>
> [if value s_cat_1051]
> [or value s_cat_1052]
> Neck Measurement: <input type="text" name="meas_m_neck" width="8"><BR>
> [/if]
>
> If the box for s_cat_1052 is checked on the previous page, the text is
> displayed correctly. If the box for s_cat_1051 is checked, nothing is
> displayed.
>
> These params are set on the previous page as such:
>
> <input type="checkbox" name="s_cat_1051"> Long Sleeved Dress Shirts <BR>
> <input type="checkbox" name="s_cat_1052"> Short Sleeved Dress Shirts <BR>
>
> Also, for testing porposes I put the following right above the if / or part:
>
> 1051 [value s_cat_1051]<BR>
> 1052 [value s_cat_1052]<BR>
>
> Both values return "on".
>
> Removing the [or] tag causes the [if] to work fine.
>
> Is there something I'm missing? Running 4.8.1.
Yes -- you aren't thinking about HTML behavior.
If a checkbox is off, the browser doesn't submit anything for it, i.e.
you don't get /cgi-bin/yourcat?s_cat_1051=&s_cat_1052=on, you get
only /cgi-bin/yourcat?s_cat_1052=on.
So, Interchange has no idea you want to reset the persistent value
s_cat_1051.
Probably what you want is:
[if cgi s_cat_1051]
[or cgi s_cat_1052]
Neck Measurement: <input type="text" name="meas_m_neck" width="8"><BR>
[/if]
--
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH 45013
phone +1.513.523.7621 <mheins@redhat.com>
"All you need in this life is ignorance and confidence, and
then success is sure." -- Mark Twain
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users