 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
uberbandit
Joined: 19 Jan 2006 Posts: 5
|
Posted: Thu Jan 19, 2006 8:37 am Back Button go back more than one link? |
|
|
|
We have several proxies... with rather limited functionality. I've created a simple 403 (Access Denied) page, that captures the user's ID, IP address, URL, etc, and then forwards that information to a perl script which displayes a specific text message depending on the URL or the User.
I've attempted to incorporate a BACK button to go back to the last successful page... but it always get caught in the 403 loop. When the Back Button is incorporated, it simple goes back to the initial page that was blocked... loop. It is really a problem with Google search links are blocked... they can't go back to the intial Google search without closing the browser and retyping in the search. Not the end of the world, but inconvenient.
I'd like to go back two. I've tried all variations of "<a href='JavaScript:history.back(1)'>BACK</a>", like using 'history.back(2)' or '(-1)'... but nothing works.
Anyone have any suggestions?
Thanks,
Dave |
|
degsy

Joined: 23 Feb 2005 Posts: 2440 Location: North East, UK
|
Posted: Thu Jan 19, 2006 10:17 am |
|
|
|
history.go(-2)
If you are using a server-side script and the referer is set then you can pass that from the 403 page to the script and define the absolute link. |
|
uberbandit
Joined: 19 Jan 2006 Posts: 5
|
Posted: Thu Jan 19, 2006 10:35 am |
|
|
|
What's the difference between "<a href='JavaScript:history.back(1)'>BACK</a>" and "history.go(-2)", and how would I incorporate that into a variable for the 500.pl perl script?
<HTML><TITLE>500 - Internal Server Error</TITLE>
<BODY onLoad="theForm.submit();">
<FORM method="post" action="http://proxy.dhc.com/errorpages/500.pl" name="theForm">
<INPUT TYPE=hidden NAME="username" VALUE="%A">
<INPUT TYPE=hidden NAME="date" VALUE="%t">
<INPUT TYPE=hidden NAME="actualrequest" VALUE="%R">
<INPUT TYPE=hidden NAME="filename" VALUE="%f">
<INPUT TYPE=hidden NAME="uas" VALUE="%U">
<INPUT TYPE=hidden NAME="protocol" VALUE="%P">
<INPUT TYPE=hidden NAME="sourcip" VALUE="%Uc">
<INPUT TYPE=hidden NAME="destip" VALUE="%I">
<INPUT TYPE=hidden NAME="cat" VALUE="%C">
<INPUT TYPE=hidden NAME="requestmethod" VALUE="%IM">
<INPUT TYPE=hidden NAME="build" VALUE="%s">
<INPUT TYPE=hidden NAME="dbserial" VALUE="%S">
</FORM>
</BODY>
</HTML> |
|
degsy

Joined: 23 Feb 2005 Posts: 2440 Location: North East, UK
|
Posted: Thu Jan 19, 2006 10:41 am |
|
|
|
history.back() is a single function to go back 1 leap.
history.go is a function allowing you to choose the leap.
I don't know PERL so you would have find out how to code it.
There will be a HTTP_REFERER environmental variable that you can use to capture the URL of the page the user came from. |
|
uberbandit
Joined: 19 Jan 2006 Posts: 5
|
Posted: Thu Jan 19, 2006 12:22 pm |
|
|
|
Getting closer... The proxy cannot perform any server-side scripting, only typicaly HTML.
How can I capture those Environment Variables via HTML?
Looked all over Google, but can only find Perl examples.
Dave |
|
degsy

Joined: 23 Feb 2005 Posts: 2440 Location: North East, UK
|
Posted: Fri Jan 20, 2006 7:08 am |
|
|
|
| You can't in HTML. You would have to use Server Side scripting such as PHP, ASP or PERL. |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|