Javascript to stop back button from causing popup

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tess
    New Member
    • Mar 2007
    • 1

    #1

    Javascript to stop back button from causing popup

    We are coding a popup window on exit of our site. We do not want this popup to occur if someone hits the back button. How do we stop this. Any hints?
  • Ganon11
    Recognized Expert Specialist
    • Oct 2006
    • 3651

    #2
    You'll have better luck looking in the Javascript forum.

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      Originally posted by Ganon11
      You'll have better luck looking in the Javascript forum.
      Moved to Javascript forum.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Originally posted by tess
        We are coding a popup window on exit of our site. We do not want this popup to occur if someone hits the back button. How do we stop this. Any hints?
        Welcome to The Scripts and the Javascript forum (where you've been directed to!)

        Show your code. I'm assuming you're using onunload to display the popup window.

        One thing is that for a website on the internet, it is bad practice to show a popup when exiting a site. It's annoying for the user and popup blockers will probably block it anyway. If, however, it's for specific users and they expect the popup, then of course there's no problem.

        Comment

        Working...