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

Intercept or disable back button in IE 1

Status
Not open for further replies.

vanni75

Programmer
Nov 27, 2002
29
BE
Hi,

does anybody know if it's possible to disable the backbutton or at least intercept it in Internet Explorer. How can I do that?

Many Thx
 
You can't do anything with the back button as it's featyre of the IE Application, but as long as JavaScript is enabled you can use JavaScript to clear/control the IE current context history I believe.
 
Ok that first link should be
http:\\
my apologies, it's friday


Rhys
Buffy: Spike, what are you doing here, five words or less!
Spike: Out for a walk... bitch!
 
You can just put the following bit of javascript on every page to effectively disable the back button:

history.go(1);


penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
link9 is correct...

I use
history.go(1); on each page that I don't want people to be able to go back....

Star for link9
dlc
 
where on the page do you put
history.go(1);

should it be enclosed in script tags? please give simple example
 
Just put it in the onload event of the body tag.

e.g.
Code:
<body onload="javascript:history.go(1)">


----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top