WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 document.readyState equivalent in Mozilla, Mark Williams, February 24, 2005
     Re:document.readyState equivalent in Mozilla, Idris, February 25, 2005
         Re:document.readyState equivalent in Mozilla, Mark Williams, February 28, 2005

Subject: Re:document.readyState equivalent in Mozilla From: Mark Williams Date: February 28, 2005
Thanks Idris.

I'm using onbeforeunload to check for unsaved changes.
http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onbeforeunload.asp

It throws a dialog that you cannot (AFAIK) get a true/false from because you set the returnvalue to the message you want in the dialog box. On OK it will go to the location you've asked for, and on cancel it stays on this page.

There is no way apart from the readyState thing I've found for IE that will tell you what the user has chosen.

In my case I have some reasonably complicated stuff going on - but at its simplest you may want to start or stop a loading animation.

I thought about combining onunload with onbeforeunload and using a timeout - but that is incredibly flaky because onunload fires when the new page starts to load which can be a while after onbeforeunload.

m



Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX