[Zope] redirect vs. return
Geir Bækholt
Geir Bækholt
Fri, 25 Apr 2003 12:59:13 +0200
On Fri, 25 Apr 2003 13:51:21 +0300 GMT (..12:51 where i live(GMT+2) )
Paavo Parkkinen asked the Zope mailinglist about the following:
PP> We have a ZPT form and a python script to handle the data from the
PP> form. After some processing we return to the form with a
PP> return Form(data=data)
PP> Now we have <a name="x"> -links in the form and we would like to
PP> return to one of them. Is there any way to return with return, or do
PP> we have to use response.redirect()?
If i get your drift, you want to scroll the returned document to a
named anchor ?
This is a client-side issue, which your browser has to handle, and has
to be made with a redirect if you cannot trick the browser in some
clever way.
perhaps it would work if you submitted your form to the url of the
script with #anchorname appended.. But you probably want to set the
anchor conditionally on the script processing results? - then this is
not a good solution.
Javascript would be the next solution, but i think a
RESPONSE.redirect() would be preferrable.
:)
--
Geir Bækholt