RE: javascript question

"Kirk Daries" <[email protected]> Mon, 05 Jan 2004 08:25:41 +0200
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Hi Christian,

I don't know if this is what you are looking for.

(Well... I work in a IE only environment)

The document object in IE has a 'readyState' property.

I normally use it when loading script files across frames.

E.g.

  function setup() {
    if (top.JScripts != null) {
      if(top.JScripts.document.readyState.toString() != 'complete') {
        window.setTimeout('setup();',50);	//	Wait for
document completion
        return;
      }
      
      //Process the setup procedure.
    }
  }

--KD

>>> [email protected] 2004/01/03 16:39:46 >>>
Thanks Diez,

That's kind of what I ended up doing. Basically, I set a flag saying
"pageFullyLoaded=false" and then as the pages finish loading I change
that
value to true. Then, when I get an onload() event in the body of the
main
page (indicating the page complete), I can check the value - if its
still
set to false, that tells me that the user interrupted it somehow.

Works perfectly in NN/MZ (for both pressing the stop button and
hitting
CTRL+R); in IE, however, it only works for pressing the stop button. I
can
live with that I suppose...

Christian
----------------------------------------------
Christian Cryder
Internet Architect, ATMReports.com
Project Chair, BarracudaMVC - http://barracudamvc.org 
----------------------------------------------
"Coffee? I could quit anytime, just not today"


> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]]On Behalf Of Diez B.
Roggisch
> Sent: Saturday, January 03, 2004 6:40 AM
> To: [email protected] 
> Subject: Re: [Barracuda] javascript question
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Am Freitag, 2. Januar 2004 05:19 schrieb Christian Cryder:
> > Just to clarify, I'd like to distinguish between a page being
stopped
> > because it finished vs. a page being stopped by the user. Likewise,
I'd
> > like to distinguish between a page reloading on its own (ie.
> meta tags) vs.
> > being forced to reload by the user.
>
> The only thing I can think of for checking if a page was finished
> or stopped
> is that the tcp/ip connection the browser made will fail with a
> broken pipe
> error. Thats usually dealt with under the hood of the webserver,
> so I have no
> idea if you can get anything from there.
>
> Diez
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3 (GNU/Linux)
>
> iD8DBQE/9qobBUNnEs5xWG4RAi5oAJ9kLYE3YGAySAIPmnYlJ6HY/FvRIwCfTFja
> f7TM7S2aFzFsfDZaiUySSsM=
> =1dUp
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Barracuda mailing list
> [email protected] 
> http://barracudamvc.org/lists/listinfo/barracuda 

_______________________________________________
Barracuda mailing list
[email protected] 
http://barracudamvc.org/lists/listinfo/barracuda
---------------------------------------------------------------
“All views or opinions expressed in this electronic message 
and its attachments are the view of the sender and do not 
necessarily reflect the views and opinions of the 
Provincial Government Western Cape (“the PGWC”).  
No employee of the WCPG is entitled to conclude a 
binding contract on behalf of the PGWC unless he/she 
is an Accounting Officer of the PGWC, or his or her 
authorised representative.

The information contained in this message and its attachments 
may be confidential or privileged and is for the use of the 
named recipient only, except where the sender specifically 
states otherwise.  If you are not the intended recipient you 
may not copy or deliver this message to anyone.”