[Zope] How to get name of calling DTML or script..

Jason Bush jason@nol.org
Wed, 10 Jul 2002 16:02:24 -0500


--------------53CD8C1E63E49DDCD2764F47
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

x = request.HTTP_REFERER

so, RESPONSE.redirect(request.HTTP_REFERER)

will reload the page that called the script...

Kevin Carlson wrote:

> I have a python script which needs to redirect the browser to the page that
> called the script.  In other words, if I am on the a page called "test" and
> I call a script named "blah", I want the blah script to do the following
> (among other things):
>
> ...
> context.request.RESPONSE.redirect(x)
>
> where x is the name or URL of the page that called the script.  Make sense?
> Any ideas?
>
> Kevin
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

--
Jason Bush  ---    jason@nol.org
Nebraska Online    http://www.nol.org



--------------53CD8C1E63E49DDCD2764F47
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
x = request.HTTP_REFERER
<p>so, RESPONSE.redirect(request.HTTP_REFERER)
<p>will reload the page that called the script...
<p>Kevin Carlson wrote:
<blockquote TYPE=CITE>I have a python script which needs to redirect the
browser to the page that
<br>called the script.&nbsp; In other words, if I am on the a page called
"test" and
<br>I call a script named "blah", I want the blah script to do the following
<br>(among other things):
<p>...
<br>context.request.RESPONSE.redirect(x)
<p>where x is the name or URL of the page that called the script.&nbsp;
Make sense?
<br>Any ideas?
<p>Kevin
<p>_______________________________________________
<br>Zope maillist&nbsp; -&nbsp; Zope@zope.org
<br><a href="http://lists.zope.org/mailman/listinfo/zope">http://lists.zope.org/mailman/listinfo/zope</a>
<br>**&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp; **
<br>(Related lists -
<br>&nbsp;<a href="http://lists.zope.org/mailman/listinfo/zope-announce">http://lists.zope.org/mailman/listinfo/zope-announce</a>
<br>&nbsp;<a href="http://lists.zope.org/mailman/listinfo/zope-dev">http://lists.zope.org/mailman/listinfo/zope-dev</a>
)</blockquote>

<pre>--&nbsp;
Jason Bush&nbsp; ---&nbsp;&nbsp;&nbsp; jason@nol.org
Nebraska Online&nbsp;&nbsp;&nbsp; <A HREF="http://www.nol.org">http://www.nol.org</A></pre>
&nbsp;</html>

--------------53CD8C1E63E49DDCD2764F47--