Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I show "Warning: this page has expired"

Status
Not open for further replies.

MeTheGreat

Programmer
Jul 25, 2000
5
0
0
IN
How can I show &quot;Warning: this page has expired&quot; when a user<br>presses &quot;BACK&quot; button to go back to the page he came from?<br><br>When he presses the back button, he must not get the previous page but an error message?
 
I am also looking for an answer to this question. I have had some luck with the following approach but as you will see it's not 100% foolproof.<br><br>I have a shopping cart where I want the user to be redirected to an error page if they try to back up after completing their purchase. One way is to use a javascript onUnload statement in the &lt;body&gt; tag which points to a function that sends the user to wherever you want them to go. However, this is of variable functionality. Works pretty seamlessly in PC browsers but we found that on Mac browsers, it only works for page links and not for the browser back-button.<br><br>Another way could be to try putting an asp statement in the page you don't want revisited. Something like:<br><br><font color=red>if request.serverVariables(&quot;HTTP_referer&quot;) = &quot;<A HREF=" TARGET="_new"> then response.redirect(&quot;errorpage.asp&quot;) end if</font><br><br>However, I had trouble getting this to work for the back button. <br><br>Any one who knows any other approaches to this speak! <p>--Will Duty<br><a href=mailto:wduty@radicalfringe.com>wduty@radicalfringe.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top