RE: [Zope] RE: RE: [Zope] Q: howto change HTTP_REFERER
Ok, I see the point. But how can I return to the second last page with a RESPONSE.redirect? If I use <dtml-call "RESPONSE.redirect(HTTP_REFERER)"> a call will be redirected to my calling form. E.g. I want to have management screens for the users with that they can add instances of things. I have put the forms that will be used to get necessary information in a subfolder, say /Forms and ZSQL Methods in another subfolder /SQL. So this will result in the following calling sequence: .../frmAManagementScreen -> /Forms/frmAddNewUser -> /SQL/sqlAddUser After adding a user by /SQL/sqlAddUser I want to return to .../frmAManagementScreen and NOT to /Forms/frmAddNewUser. But a <dtml-call "RESPONSE.redirect(HTTP_REFERER)"> in /SQL/sqlAddUser (which is the last in the calling sequence) will return to /Forms/frmAddUser.
Ok - probably the best way to do this is to have frmAddUser include a hidden field in the form, a la: <input type="hidden" name="go_back_to" value="<dtml-var HTTP_REFERER>"> When the form is submitted, the form handler can then do the redirect to whatever the value of "go_back_to" is. Brian Lloyd brian@digicool.com Software Engineer 540.371.6909 Digital Creations http://www.digicool.com
participants (1)
-
Brian Lloyd