[Zope] How to emulate browser back button

R. David Murray bitz@bitdance.com
Mon, 3 Apr 2000 14:54:12 -0400 (EDT)


On Mon, 3 Apr 2000, Itamar Shtull-Trauring wrote:
> > I feel there must be a way to emulate the browser 'back' button in Zope.
> > Can anyone tell me if this is possible please ?
> 
> You can use <a href="javascript:history.go(-1)">Back</a>.  But it won't work
> in browsers that don't support javascript.

You can do it without javascript, but you have to *do* it.  HTTP
is stateless, so the only way the REQUEST stuff can get forwarded
is if you put it into the intermediate web page.  That is, you have
to make that continue button a form button, and put the current
values of the variables in hidden data fields.  Then your form has
to have logic to recognize that it is being (re)called with values
already set, and insert those values into the value fields of your
form elements.

If you go this route, instead of having a separate error page with
a continue button, you might consider having the form be its own
action, and have it redisplay with appropriate error messages and
field highlights.  This could potentialy provide a superior user
experience...

--RDM