[Zope] R: [Zope] How to emulate browser back button

Marcel Preda marcel@punto.it
Mon, 3 Apr 2000 18:55:22 +0200


----- Original Message -----
From: Richard Moon <richard@dcs.co.uk>
To: <zope@zope.org>
Sent: Monday, April 03, 2000 6:06 PM
Subject: [Zope] How to emulate browser back button


> I feel there must be a way to emulate the browser 'back' button in Zope.
> Can anyone tell me if this is possible please ?
>
> The reason is that I have a form, with input fields like
>
> input name="address1"
>                 width=30 value="&dtml.missing-address1;">
>
> Input from the form is validated in the dtml-method which receives the
> input from the form. So if a particular field is invalid I can tell the
> user to use their back button to return to the form. Using the
> &dtml.missing- means that other data already entered is re-displayed to
the
> user. This is excellent stuff.
>
> However, rather than telling the user to press the back button I want to
> put an anchor on the screen which says continue - something along the
lines of
>
> <a href="<dtml-var HTTP_REFERER>">Continue</a>
>
> This works, in the sense that it returns to the form, but all the form
> variables are lost. I've checked the REQUEST variable and they are just
not
> there any more - I guess because the form cannot tell it is being returned
to.
>
> I just know I'm missing something obvious.

I'm not so sure if I understood what did you ask...
But maybe this will help you:


<A HREF="whatever" onClick="history.back();return true" >Go Back</A>


Marcel