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

disable back button of browser

Status
Not open for further replies.

manjumurthy

Programmer
Sep 24, 2001
3
IN
I would like to know how to disable the back button of browser only for some pages. I foun answers related to No Cache attribute but it disables the back button throughout the entire application. My problem is as follows:
I have a page which is calling another html page. From the second page i should not be able to go back to the first page. How do i do that???
 
I've never seen it done. As far as I know, it's not possible. I sure wouldn't want some website doing it to me...
 
hi
you can use location.replace(url) - this would replace last entry in the history.. i'm not shure that this is what you was for.. Victor
 
Hey, vituz has a point. If on your first page you change the URL by using
Code:
location.replace()
, it replaces the history item for the first page. So, if the user presses the back button from the second page, it will skip to the page the user viewed before the first page. That would work, so long as you use that function to move from the first to the second page.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top