Thread View: microsoft.public.inetsdk.programming.scripting.jscript
4 messages
4 total messages
Started by Rafael Rasinger
Wed, 20 Oct 1999 00:00
Does "onwindowclose.event" exist?
Author: Rafael Rasinger
Date: Wed, 20 Oct 1999 00:00
Date: Wed, 20 Oct 1999 00:00
10 lines
1381 bytes
1381 bytes
Dear reader! I am looking for an "onwindowclose" event in JS. Saying: If a user wants to close the Browser window a JS function is launched (in my case a loggout page is loaded) before the browser is closed. Is there a posibility of performing this feature (in NN and MSIE)? Thanx for ur help, Rafael
Re: Does "onwindowclose.event" exist?
Author: Scott A. Hightower
Date: Wed, 20 Oct 1999 00:00
Date: Wed, 20 Oct 1999 00:00
15 lines
1425 bytes
1425 bytes
<body onunload="some javascript"> Rafael Rasinger wrote: > Dear reader! > > I am looking for an "onwindowclose" event in JS. > > Saying: If a user wants to close the Browser window a JS function is > launched (in my case a loggout page is loaded) before the browser is closed. > Is there a posibility of performing this feature (in NN and MSIE)? > > Thanx for ur help, Rafael
Re: Does "onwindowclose.event" exist?
Author: Ben Carter
Date: Wed, 20 Oct 1999 00:00
Date: Wed, 20 Oct 1999 00:00
29 lines
2047 bytes
2047 bytes
I don't believe onunload() is reliable enough, it won't be able to load a page before it actually unloads. In IE there is the event onbeforeunload(), which is what you want. Unfortunately, this has no equivalent in NS. Rafael Rasinger wrote: > > Dear reader! > > I am looking for an "onwindowclose" event in JS. > > Saying: If a user wants to close the Browser window a JS function is > launched (in my case a loggout page is loaded) before the browser is closed. > Is there a posibility of performing this feature (in NN and MSIE)? > > Thanx for ur help, Rafael -- //////////////////O\\\\\\\\\\\\\\\\\\ //// \\\\ /// Ben S. Carter, \\\ // Web Application Developer, \\ / Bluewater Parklands Mgmt. Inc. \ > Guelph, ON, N1H 3G3 < \ 519-766-0901 Ext. 226 / \\ ben@camis.com // \\\ webmaster@camis.com /// \\\\ //// \\\\\\\\\\\\\\\\\\O//////////////////
Re: Does "onwindowclose.event" exist?
Author: Scott A. Hightower
Date: Thu, 21 Oct 1999 00:00
Date: Thu, 21 Oct 1999 00:00
46 lines
3037 bytes
3037 bytes
Actually, I avoid trying to do anything extensive or critical upon closure of a window, whether browser or application. I consider it a usability irritant, since the user may be trying to shut down their system, or in the middle of an emergency. Whenever possible, do as much of your cleanup/logout/pre-logout as you can along the way, and also design your application to come back up in a sane useful state if it was shut down suddenly, say due to a system crash or lockup. (I've heard those happen every once in awhile...) That said, yes, onunload is not reliable. If you think you will usually or often have to display a logout window, bring it up beforehand, but keep the focus on the main window. If the user does an orderly logout from the main window, close the other one. If they just close the main window, the logout window is there to finish the job. Ben Carter wrote: > I don't believe onunload() is reliable enough, it won't be able to load > a page before it actually unloads. > In IE there is the event onbeforeunload(), which is what you want. > Unfortunately, this has no equivalent in NS. > > Rafael Rasinger wrote: > > > > Dear reader! > > > > I am looking for an "onwindowclose" event in JS. > > > > Saying: If a user wants to close the Browser window a JS function is > > launched (in my case a loggout page is loaded) before the browser is closed. > > Is there a posibility of performing this feature (in NN and MSIE)? > > > > Thanx for ur help, Rafael > > -- > //////////////////O\\\\\\\\\\\\\\\\\\ > //// \\\\ > /// Ben S. Carter, \\\ > // Web Application Developer, \\ > / Bluewater Parklands Mgmt. Inc. \ > > Guelph, ON, N1H 3G3 < > \ 519-766-0901 Ext. 226 / > \\ ben@camis.com // > \\\ webmaster@camis.com /// > \\\\ //// > \\\\\\\\\\\\\\\\\\O//////////////////
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads