One thing I'm running into with Ajax is dynamically loading scripts.
Once the <SCRIPT> or <LINK> is added to the <HEAD> using DHTML, the
script can't be safely referenced until it is "fully" loaded. In IE-
land, this is accomplished with the readyState property which is set
to 4 when the document (or sub-document in this case) is fully loaded.
In Mozilla this is done through an onload event. So, it's possible to
"simulate" an IE-esque readyState property like this:

var e = createElement( "SCRIPT" );
if( undefined == e.readyState )
  e.readyState = 0;
  e.onload = function() { this.readyState = 4; }

This is simplistic, and needs to be fleshed out much more (as in what
if onload needs to be defined for some other purpose?)

I think this would be an excellent feature for a future release of
prototype. Comments?

You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at

Reply via email to