To capture Window close event in Javascript.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Swarna Reddy
    New Member
    • Oct 2011
    • 1

    To capture Window close event in Javascript.

    How to capture window close event in case of Mozilla Browser.?
    I used "onbeforeunload " event which of no use..? This event got triggered even when we refresh the page.

    Please let me know If you have solution.

    Thanks,
    Swarna
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    This event got triggered even when we refresh the page.
    of course. if you refresh a page, you close it and then open it again (the fact that the URL stays the same doesn’t matter here).

    personally I doubt there is such an event (at least I didn’t find an event in the HTML5 specs that matched)

    Comment

    Working...