aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes how to disable back button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to disable back button" Watch "how to disable back button" New topic
Author

how to disable back button

challa
Greenhorn

Joined: Mar 28, 2005
Posts: 23
Hi,
Can anyone please tell me how to disable back button in the browser. When the user clicks back button he should get the same page. Please help me how to do this.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You can not disable the back button.

Eric
challa
Greenhorn

Joined: Mar 28, 2005
Posts: 23
Eric,

Can you please tell me, using java script how to load the same page when the user clicks the back button.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You can not control what the back button does. I wrote this awhile back, but it is not the best solution: http://www10.brinkster.com/A1ien51/basics/backbutton.htm

Eric
Namnai Kidorkar
Greenhorn

Joined: Jul 02, 2005
Posts: 25
conceptually this might be done, never tried...

send back and forth a flag, and make the flag true when it comes to the page where u want to be. then, in the back page make a function such that if the flag is true it will be forwarded to the next page.

if will not disable the back button for sure but what will happen is that it will go back to the old page and come back autometically.
 
Consider Paul's rocket mass heater.
 
subject: how to disable back button