[ic] Using [if]
Thomas McAlees
tmcalees@discgolfcentral.com
Wed, 3 Jan 2001 08:57:55 -0500
This is a multi-part message in MIME format.
------=_NextPart_000_0035_01C07563.43591EA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
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=3D"mv_searchspec" index=3D"0"] eq =
[loop-code]]
<OPTION selected VALUE=3D"[loop-code]">[loop-pos 1]
[else]
<OPTION VALUE=3D"[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
------=_NextPart_000_0035_01C07563.43591EA0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4611.1300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Please forgive my ignorance, but I've =
been trying=20
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=20
loop. Here is the snippet of code:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> [list]<BR> [if =
value=20
[value-extended name=3D"mv_searchspec" index=3D"0"] eq=20
[loop-code]]<BR> <OPTION selected=20
VALUE=3D"[loop-code]">[loop-pos 1]<BR> =20
[else]<BR> <OPTION=20
VALUE=3D"[loop-code]">[loop-pos 1]<BR> =20
[/else]<BR> [/if]<BR> [/list]</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>This list populates a combo box with a =
list of=20
states. I would like to default the selection to the current value =
of=20
mv_searchspec.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Tom</DIV>
<DIV><BR></DIV></FONT></BODY></HTML>
------=_NextPart_000_0035_01C07563.43591EA0--