[Zope] Forms' "action" and (concatenation of) dtml-var's

Dirk Van.Laanen Dirk.Van.Laanen@niwi.knaw.nl
Fri, 22 Mar 2002 13:46:03 +0100


Hello,=20

The following works in zope: a small form with some action defined and=20
for the rest only a submit button, if the action is simple, like:=20

<form method=3Dpost=20
action=3D"index_html">
<input type=3D"submit" name=3D"" value=3D"submit">
</form>
will bring up the index_html page.=20


But compare the following:=20

<dtml-in expr=3D"decrQuery(datum=3D(_.str(datum)))" next size=3D1 =
orphan=3D1 start=3Dteller>
<a href=3D"<dtml-var URL><dtml-var sequence-query
            >teller=3D<dtml-var
            next-sequence-start-number>">
         volgend image
         </a>
</dtml-in>


This will work, the link will take you to the next batch of 1. But:=20


<dtml-in expr=3D"decrQuery(datum=3D(_.str(datum)))" next size=3D1 =
orphan=3D1 start=3Dteller>
<form method=3Dpost=20
action=3D"<dtml-var URL><dtml-var sequence-query
            >teller=3D<dtml-var
            next-sequence-start-number>">
<input type=3D"submit" name=3D"" value=3D"&gt;">=09
</form>
</dtml-in>


will give a name error because a variable (datum) is not recognised.=20

even when i paste the correct url, like:
action=3D"/toondecr?datum=3D1796/03/02&teller=3D33">
i will get the same name error=20


What is it with forms that variables that were recognised a few lines =
earlier=20
(thus, apart from the form, in the same context), won't be read?=20
In other words: what am i doing wrong?=20

Remarkable: when i get the name error, the url has already changed to the =
correct one, eg:=20
/toondecr?datum=3D1796/03/02&teller=3D33
When i reload that page i get the same error message.=20
When i copy the new url and paste it into a new window, i get the correct =
page.=20

cheers, Dirk=20