function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
EPSWDEVEPSWDEV 

OnUnload Event for Visual Force page.

I am trying to capture the 'onunload' javascript event on a visual force page. Adding a html body tag and then adding the onunload event dosnt work. How can I capture this event.

In general I am trying to prompt the user when they move away from this page (either to another tab or link within the browser or if they decide to close the browser).

Thanks
Rajesh ShahRajesh Shah

Were you able to solve this problem? I need to do a similar thing - do some on activity before the visualforce window is closed.

 

Thanks