F
feng
I want to use onunload to capture user's action when he
clicks on the "x" button to close the browser. Here is how
I do this:
<SCRIPT FOR="window" EVENT="onunload">
myScript();
</SCRIPT>
While myScript() does get called when "x" gets clicked, it
is also get called when the user leaves the current page
and navigate to another page within our web application.
My question is how do I determin if onunload is fired
because of an "x" clicking, an attempt to go out of
current web application, or simply go to another page
within our application.
Any input will be highly appreciated.
Thanks
Lifeng
clicks on the "x" button to close the browser. Here is how
I do this:
<SCRIPT FOR="window" EVENT="onunload">
myScript();
</SCRIPT>
While myScript() does get called when "x" gets clicked, it
is also get called when the user leaves the current page
and navigate to another page within our web application.
My question is how do I determin if onunload is fired
because of an "x" clicking, an attempt to go out of
current web application, or simply go to another page
within our application.
Any input will be highly appreciated.
Thanks
Lifeng