[ic] lost in [if] [log] world...

Aaron Hazelton interchange-users@interchange.redhat.com
Fri Apr 26 17:59:00 2002


Okay, I have so far created 2 components that are 'polls' (thanks for
your info Kevin).  I have a hidden variable called "which_poll" and a
unique value for each poll.  The purpose of that was I figured I could
just make one page my 'poll_results' page.  Here's what I have on the
results page:

<--begin results page-->
[if type=value name="which_poll" op="ne" compare="site_design"]
&nbsp;
    [log file="poll_site_design" joiner="\t" type=quot hide=1
interpolate=1]
    [value site_design][/log]

[elseif type=value name="which_poll" op="ne" compare="cat_browser"]
&nbsp;
    [log file="poll_cat_browser" joiner="\t" type=quot hide=1
interpolate=1]
    [value cat_browser][/log]

[/elseif]
[else]&nbsp;[/else]
[/if]
<--end results page-->

First of all, I created the [if]'s just like the docs say, (with op="=~"
and with compare="/value/") but that didn't work, played around with it
and came up with this which DOES, but with an undesirable result.  First
of all, the results page shows this:

 [elseif type=value name="which_poll" op="ne" compare="cat_browser"]
[/elseif] 

So something is not recognized as being part of the [if] I guess.  Also,
even with this error, both polls do log to the appropriate file!
However, if you participate in both polls while in the same session
(before you close your browser) the second one and any subsequent
entries re-enter in BOTH files (i.e you poll "a" in poll 1, then when
you poll "b" in poll 2, another "a" will be polled in poll 1 at the same
time.)

1. does anybody know where the [if] statement is incorrect that it is
DISPLAYING the [elseif] ?
2. is there a way to DUMP the value of "which_poll" either in the [if]
or after it?  Wouldn't that allow the second poll to assign the value of
that variable and correct the double entries?

As always, thanks!  (new design is coming along well :-)
  _____  

Sincerely,
Aaron Hazelton
>>Hazenet<<
aaron@hazenet.net