[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] making a link for previous page
On Thursday 12 September 2002 18:06, you wrote:
> How do I make a link for previous page.
In the mailing list archives, search for "env usertag".
(it is in
interchange.redhat.com/pipermail/interchange-users/2001-May/007684.html
) After installing this tag, [env 'HTTP_REFERER'] is the previous page (yes,
it should be 'referer' and not 'referrer'). You can simply use
<a href="[env 'HTTP_REFERER']">Click here to go back to previous page</a>
to have a link to the page before.
If you want to go to the 'previous' page in a form that you might post
several times, you can create a CGI variable that remembers what
page you originally came from:
<form method="POST">
[perl]
my $refer=$Tag->cgi("referring_page");
if ($refer eq "") { $refer=$Tag->env('HTTP_REFERER'); }
return <<EOG;
<input type="hidden" name="referring_page" value="$refer">
<a href="$refer">Click here to go back to previous page</a>
EOG
[/perl]
</form>
Hope this helps.
Regards,
Marc Brevoort