[Zope] Re: Your Help is seriously needed : retrieving Dtml Documents with user input filled from the form

Dieter Maurer dieter@handshake.de
Wed, 12 Sep 2001 00:06:35 +0200 (CEST)


Hamzat kamal writes:
 > ....
 > <input type="text" name="date_code">.
 > ....
 > My problem is this.
 > 
 > I have some other links on the index_html page which suppose to use the 
 > date_code value which the user typed to display their contents as well, and 
 > i have already stored those content in their various folders, but to my 
 > surprise when clicked on these links this is the error message i got:
 > 
 > Error Type: NameError
 > Error Value: date_code
When you click a link, a new request is send to Zope.
This creates a new REQUEST object with no reference to the old
request at all. "date_code" from the former request is lost,
until you (as application developper) take steps to prevent this.

You options:

  *  use a session product (--> zope.org)

  *  use a cookie (--> Zope Online Help --> API reference --> RESPONSE)

  *  use a query string in your links

     <a href="dest?date_code=&dtml.url_quote_plus-date_code;">...</a>

Background information in

  <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>



Dieter