When the Window Closes

Results 1 to 2 of 2

Thread: When the Window Closes

  1. #1
    RobT Guest

    Default When the Window Closes

    Is it possible to detect when a user closes the window in JavaScript? I exclusively mean the X in the upper right hand corner of the window. No buttons or links.<BR><BR><BR>Thanks,<BR><BR><BR>Rob<BR>

  2. #2
    olly wenn Guest

    Default RE: When the Window Closes

    &#060;body onUnload="alert(&#039;closing&#039;)"&#062;<BR><BR >of course you will want to do something more funky than this, like call a function, in the window.opener window for instance.<BR><BR>try this for a giggle...<BR>&#060;body onUnload="window.open(document.location.href)"&#06 2;<BR>the never-closing window!<BR>Good luck!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts