Open popup when user closes window

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chazzy69
    New Member
    • Sep 2007
    • 196

    #1

    Open popup when user closes window

    Basically i was wondering how to open a popup window, when the user closes either a website i.e. leaving the website; or closes the entire browser.

    Thanks for any help
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    You can use the onbeforeunload event (where supported). However, a word of warning: only use it where the user will thank you for it. In other words, use responsibly. There are plenty of cases of misuse which only annoy the user pretty much guaranteeing that you've lost another visitor.

    Comment

    • chazzy69
      New Member
      • Sep 2007
      • 196

      #3
      Thanks for information, ill see what i can find.

      Thanks again

      Comment

      Working...