Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


IE Browser back button capture using javascript

Posted on 2008-10-09
Medium Priority
Last Modified: 2009-06-16
I am looking for a java script snippet that can capture the use of the back button on IE, post a message to the user, and not allow the back action to take place
Question by:sladej
  • 2
LVL 11

Expert Comment

ID: 22679661
You can use the onbeforeunload event but may have it's limitations:

Author Comment

ID: 22679884
This works for any movement off the page.  We need something that will work if the back or fwd buttons are used only.
LVL 11

Accepted Solution

flipz earned 750 total points
ID: 22679962
I am not aware of any events that only trap those conditions. If such an option was available - although I can think of many good uses for it - I can also imgaine some very irritating uses as well. Even though I cannot offer any more suggestions - I will be monitoring this post to see if a solution exists. Good luck.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question