Just figured out how to prevent the user from clicking the BACK button in the browser. RRS feed

  • Question

  • User1617854993 posted
    Hello everyone,
     Instead of asking a question this time, I thought I would post a simple, yet interesting solution to the age-old problem of the user clicking on the BACK button in IE or Netscape.
     My colleague just pointed out that, during his testing of adding an order through the web app, he could simply hit BACKSPACE on the keyboard to go back to the order entry form. Of course my app does not show the button in the web app, but he accidentally pressed BACKSPACE on the keyboard and dangerously went back to the order form - with the same entry values !

     Anyhow, this one line at the top of my aspx form worked fine for what I want to do :

    <script language="javascript" type="text/javascript">


       function ()
           // more functions here...


    Thursday, April 13, 2006 4:00 PM

All replies

  • User-1584880216 posted
    Very handy indeed!

    Thanks for the post.
    Tuesday, April 18, 2006 1:06 PM