[Zope] How to emulate browser back button

Richard Moon richard@dcs.co.uk
Mon, 03 Apr 2000 17:06:48 +0100


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.



Richard Moon
richard@dcs.co.uk