PC Review


Reply
Thread Tools Rate Thread

Determin user's intention when onunload fires

 
 
feng
Guest
Posts: n/a
 
      29th Feb 2004
I want to use onunload to capture user's action when he
clicks on the "x" button, the close window button on the
upper-right corner of the brower window, to close the
browser. Here is how I capture the event:
<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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
New WLM intention Peter in New Zealand Windows Vista Mail 10 19th Jun 2007 03:36 AM
user control dispose never fires =?Utf-8?B?VGltIFJhbWw=?= Microsoft Dot NET Compact Framework 3 6th Aug 2005 01:25 AM
Trapping the <BODY> onUnload() / Detecting when a user closes the browser =B= Microsoft ASP .NET 3 30th Sep 2004 09:20 AM
How to detect user's intention when onunload fires? feng Microsoft ASP .NET 5 29th Feb 2004 08:11 PM
Only first user control event fires. Jason Chancellor Microsoft ASP .NET 0 15th Feb 2004 02:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:43 PM.