Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: RE: [proasp_howto] RE: window_onunload


Message #1 by "Douglas J. Badin" <DJBadin@m...> on Tue, 25 Jul 2000 06:54:10 -0400
Try Window_onBeforeUnload

Doug


-----Original Message-----
From: Brian Benson [mailto:bcb@p...]
Sent: Monday, July 24, 2000 1:00 PM
To: How To
Subject: [proasp_howto] RE: window_onunload


Unfortuanately, I just read that you cannot stop the unload event from
happening. So returning true or false does not have any effect.  If anyone
knows of a good way to stop a page from unloading and loading a different
page in JavaScript please let me know.
Thanks
Brian

-----Original Message-----
From: Sander Baaij
Sent: Monday, July 24, 2000 12:20 AM
To: How To
Subject: [proasp_howto] RE: window_onunload


I presume you mean users make changes (fill form fields?) on the client side
and you process the buttonclick/unload events with clientside javascript.
Where is the asp in this story?

Anyway, try doing a "return cancel" at the end of the javascript. I'm not
sure if it will work, but I do not think there is another way.

Sander Baaij

-----Original Message-----
From: Brian Benson
Sent: Friday, 21 July, 2000 20:47
To: How To
Subject: [proasp_howto] window_onunload



  If a user has made changes to on one of my ASP pages (by entering
information)  then clicks on another link without submitting, I want to be
able to bring up a message before the page unloads to ask the user whether
or not he wants to save changes.  I ask right now during the window_onunload
event but if I try and submit a page with code like

  document.myform.submit();

  it doesn't seem to have any effect.  Does anyone know a good way to do
this.
  Thanks
  Brian




  Return to Index