[ic] [if][elsif] question
Peter Nikolaidis
peter at paradigmcc.com
Sun Jul 6 18:02:13 EDT 2003
I think it would have been funnier if Kevin has posted an example of
code that didn't work.
> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org
> [mailto:interchange-users-bounces at icdevgroup.org] On Behalf
> Of Kevin Walsh
> Sent: Sunday, July 06, 2003 4:54 PM
> To: interchange-users at icdevgroup.org
> Subject: RE: [ic] [if][elsif] question
>
>
> Himem Inc [interchange at himem.net] wrote:
> >
> > I have a search page with a drop down that allows users to search
> > different pages (eg search my site, my friends site, or
> google). I have
> > this form element named 'site'. I am trying to do
> something like this
> > for the results page:
> >
> > [if cgi site eq "my friends site"]
> > [then]
> > [bounce href="http://friends-site.com/search/?query=[cgi
> > mv_searchspec]"]
> > [/then]
> > [/if]
> > [if cgi db eq "google"]
> > [then]
> > [bounce href="http://www.google.com/?query=[cgi mv_searchspec]"]
> > [/then]
> > [/if]
> >
> > This works fine, however I would rather use an if elsif
> type form. But
> > when I change the second if to an elsif, it seems to
> default to google
> > unless my friends site is specified, such as it is saying
> else, but not
> > checking the if. Is this correct? Or am I doing something wrong?
> >
> It may be helpful to show an example of the non-working code. The
> following is an example of if/elsif/else code that does work:
>
> [tmpn foo]bap[/tmpn]
>
> [if scratch foo eq "bar"]
> [then]
> Foo is Bar
> [/then]
> [elsif scratch foo eq "baz"]
> Foo is Baz
> [/elsif]
> [else]
> D'oh!
> [/else]
> [/if]
>
> Perhaps you could compare the above with your non-working code to help
> determine what's wrong. Remember that the [elsif] block MUST be
> contained within the associated [if]...[/if], which is probably where
> you've gone wrong. See the numerous if/elsif/else examples
> in the [if]
> section of the Interchange tags documentation.
>
> --
> _/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
> _/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n
> W a l s h
> _/ _/ _/ _/ _/ _/ _/ _/_/ kevin at cursor.biz
> _/ _/ _/_/_/_/ _/ _/_/_/ _/ _/
>
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
>
More information about the interchange-users
mailing list