Trigger event when browser window / tab is closed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2011 06:19 AM
I m trying to create an event when the browser window / tab is closed. Can window.onunload function be called? if so, from where?
I see session.established event is created everytime the new session is established. Similarly, i want to trigger another event when window / tab is closed.
any idea / suggestion how to do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2011 07:50 AM
You can write a onUnload function on the UI Page corresponding to that window,I haven't tried this. Just an idea.
http://www.w3schools.com/jsref/dom_obj_event.asp
You can use the onUnload function as listed in that URI provided.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2011 12:46 PM
Thanks Abhiram. But I would like this function to be called irrespective of page User is on.