I have some Javascript that executes when the page is closed by clicking the "X" in the browser. It is tied to the <BODY OnUnload="..."> event.
I have noticed that when I click a button on the page that causes a postback and runs server-side code that it triggers the "OnUnload" event of the BODY tag.
Is there any way in the Javascript to detect if the BODY unload is because of a postback or because the window is closing?
Any ideas or suggestions are welcome!
Thanks,
Josh
I have noticed that when I click a button on the page that causes a postback and runs server-side code that it triggers the "OnUnload" event of the BODY tag.
Is there any way in the Javascript to detect if the BODY unload is because of a postback or because the window is closing?
Any ideas or suggestions are welcome!
Thanks,
Josh