Help needed with disabling IE browser back button

Discussions

EJB design: Help needed with disabling IE browser back button

  1. Hi,

    I am trying to disable the back button using following JavaScript code.

    It works in firefox browser but does not work in IE (all version)

    Here is what I am using.
    <Script>
      window.history.forward(1);
    </Script>

    The Application is jsp/servlet.

    Can you please help me?

    Thanks.
    rawar

    Threaded Messages (5)

  2. Not sure quite what you are trying to do but if you use location.replace("myurl"); to do the navigation the back button does not take the user back to the current page after a script navigates to some other page.
  3. disabling IE browser back button[ Go to top ]

    I am trying to disable the Browser back button with 3 lines of code (code is in my initial post)

    From FireFox, when I test back button I get the same page displayed (which is OK) but when I test the same thing from IE it does not work. I.e. from IE. From IE after I click a back button, it displays a page "page cannot be displayed" or some time "Warning: Page has Expired" but I want the same page to be displayed when I click back button.
    It works in Firefox why not in IE
    Please help.

    Thanks
  4. history.forward in every page[ Go to top ]

    history.forward in every page
  5. I tried that and[ Go to top ]

    It does not work in IE. I have 15 jsp files in this apps and I have added history.forward on every page.

    What could be the reason? Thanks
  6. history.go(1).[ Go to top ]

    window.onload="history.go(1);"