[Zope-dev] REQUEST contains wrong list.index ???
Robert Rottermann
robert@rocad.ch
Thu, 26 Apr 2001 08:37:03 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_0070_01C0CE2C.11CFD550
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Good morning,
=20
I came accross something I do not understand:
=20
In a form I have list. The list items are set with an option value <>
the sequence-index
like so:
<dtml-in getSubprojects>
<dtml-let curElem=3Dsequence-item>
<OPTION value=3D<dtml-var "curElem['Code']">>
<dtml-var "curElem['Name']">
</OPTION>
</dtml-let>
</dtml-in>=20
Now my question:
In the forms action I ask for the selected item in a python script
like so:
listVal =3D 0
try:
listVal =3D _['listProject']
except:
pass
To my puzlement listVal contains the index of the selected item, not
it's <option value> which I would like to gather.
=20
Where is my error?
=20
Thanks for your answers
=20
Robert
------=_NextPart_000_0070_01C0CE2C.11CFD550
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 content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#c8e0d8>
<DIV><FONT face=3DArial size=3D2>Good morning,<BR> <BR>I came =
accross something=20
I do not understand:<BR> <BR>In a form I have list. The list items =
are set=20
with an option value <><BR>the sequence-index<BR>like=20
so:<BR> =
<dtml-in=20
getSubprojects><BR> &nb=
sp; =20
<dtml-let=20
curElem=3Dsequence-item><BR> =
=20
<OPTION value=3D<dtml-var=20
"curElem['Code']">><BR> &n=
bsp; =20
<dtml-var=20
"curElem['Name']"><BR> =
=20
</OPTION><BR> =
=20
</dtml-let><BR> &nbs=
p;=20
</dtml-in> <BR><BR>Now my question:<BR>In the forms action I ask =
for the=20
selected item in a python script<BR>like so:<BR> =
listVal =3D=20
0<BR> try:<BR> listVal =
=3D=20
_['listProject']<BR> =
except:<BR> =20
pass<BR><BR>To my puzlement listVal contains the index of the selected =
item,=20
not<BR>it's <option value> which I would like to=20
gather.<BR> <BR>Where is my error?<BR> <BR>Thanks for your=20
answers<BR> <BR>Robert<BR></FONT></DIV></BODY></HTML>
------=_NextPart_000_0070_01C0CE2C.11CFD550--