Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to disable back button

 
challa
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can not disable the back button.

Eric
 
challa
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic