Discussion Locked

disabling IE's BACK button

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I need to temporarily disable the Internet Explorer's BACK Button when the user is running my web application. How can I do that?

6 replies

by jay eckles

You can't. IE doesn't provide a client-side API for dealing with the back button. At best you can do some tricks with the history object and try to back-fill it with the current page or use a kiosk window and VBScript to kill hotkeys or something like that. These are hacks that all have known work-arounds.

This is a FAQ. Check out any of the FAQs for comp.infosystems.www.authoring.html or comp.lang.javascript, for example. Search MSDN as well, but I don't think they'll have anything saying you specifically can't do it; you just won't find an article telling you how you can.

If this is especially important, there are a couple of things you can do. One, you could write an applet that parses and displays your HTML and provides whatever browsing capability you want your users to have - a browser within a browser, if you will. Very inefficient. You could also have users download your own customized version of IE - write a VB app that uses the IExplorer object to provide browsing capability.

Good luck.

Jay Eckles
www.jayeckles.com

by ebob

The closest you can come (that I know will work) is to use client-side Javascript's "window.replace()" method. This will load the requested file/page, and take up the same "slot" in the history stack.

See any good reference on Javascript, including www.javascript.com, www.zdnet.com/devhead and developer.netscape.com.

by ebob

Implement the "first page" of your website in a 'target="new"' window, which sets up a new history stack (for the new window). Then all links from this page using "window.replace()" will just be the first item in the stack. The "Back" arrow will be disabled.

This discussion is closed to new replies.