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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabling back button

Status
Not open for further replies.

lailas

Programmer
Aug 11, 2000
2
CA
I want to disable back button / history in all my pages that contain form. Does anyone know how to disable back button. I know of using the following method:<br><br>&lt;A HREF=&quot;javascript:location.replace('page2.html')&quot;&gt;Page 2&lt;/A&gt;<br><br>But I cant use this method as my pages use CGI scripts.<br><br>Please help
 
have you considered opening the page in a new window, and then closing the old window with javascript? i don't knoe\w any myself but it can be done, i know that much.
 
Try this:<br>for (i=0;i&lt;window.history.length; i++) window.history<i>=&quot;&quot;;<br><br>Please note that I didn't try it and I don't know if the history array accepts writing. <p>IvanP<br><a href=mailto:ip@thehyper.net>ip@thehyper.net</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top