[ic] Using [if]

Thomas McAlees tmcalees@discgolfcentral.com
Wed, 3 Jan 2001 13:51:22 -0500


Ed -

Thanks, that fixed the problem!  For future reference, could someone explain
why the original code doesn't work?

Tom

----- Original Message -----
From: "Ed LaFrance" <edl@newmediaems.com>
To: <interchange-users@lists.akopia.com>
Sent: Wednesday, January 03, 2001 11:36 AM
Subject: Re: [ic] Using [if]


> At 08:57 AM 1/3/01 -0500, you wrote:
> >Please forgive my ignorance, but I've been trying to get the following
> >snippet of code working for the past 3 days with no success.  I'm simply
> >try to set an <option> to selected in a loop.  Here is the snippet of
code:
> >
> >  [list]
> >     [if value [value-extended name="mv_searchspec" index="0"] eq
[loop-code]]
> >       <OPTION selected VALUE="[loop-code]">[loop-pos 1]
> >      [else]
> >        <OPTION VALUE="[loop-code]">[loop-pos 1]
> >      [/else]
> >     [/if]
> >  [/list]
> >
> >This list populates a combo box with a list of states.  I would like to
> >default the selection to the current value of mv_searchspec.
> >
> >Tom
>
> Tom -
>
> try it this way:
>
> [seti spec][value-extended name=mv_searchspec index=0][/seti]
> [list]
> [if type=scratch term=spec op=eq compare="[loop-code]"]
> ...
> [/if]
> [/list]
>
> ..this assumes that [list] does something interative.
>
> - Ed L.
>  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> New Media E.M.S.               Software Solutions for Business
> 463 Main St., Suite D          edl@newmediaems.com
> Placerville, CA  95667         http://www.newmediaems.com
> (530) 622-9421                 (530) 622-9426 Fax
> (866) 519-4680 Toll-Free
>  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
>
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@lists.akopia.com
> http://lists.akopia.com/mailman/listinfo/interchange-users