Re: Waiting for ActiveX object to have initialized
- From: "VK" <schools_ring@xxxxxxxxx>
- Date: 2 May 2006 04:23:28 -0700
marcosnogood@xxxxxxxxx wrote:
I am quite new to javascript, I wonder if there is any other way
to acommplish what I need - dynamically load an active object
(not neccessarily known during load time) and block the javascript
execution until the object has executed an init function???
In IE both <object> and <script> have onreadystatechange handler you
can attach a listener, just like for XMLHttpRequest. The only
difference is that the readyState is reported in the regular IE string
notation instead of numbers:
"uninitialized" Object is not initialized with data.
"loading" Object is loading its data.
"loaded" Object has finished loading its data.
"interactive" User can interact with the object even though it is not
fully loaded.
"complete" Object is completely initialized.
This way you can:
function notifyObserver() {
if (this.readyState = 'complete') {
// object is loaded successfully
}
}
var myObject = document.createElement('OBJECT');
// prepare object
myObject.onreadystatechange = notifyObserver;
document.body.appendChild(myObject);
.
- References:
- Waiting for ActiveX object to have initialized
- From: marcosnogood@xxxxxxxxx
- Re: Waiting for ActiveX object to have initialized
- From: Randy Webb
- Re: Waiting for ActiveX object to have initialized
- From: marcosnogood@xxxxxxxxx
- Waiting for ActiveX object to have initialized
- Prev by Date: Re: Cookie problem! Getting error when passing the expire date.
- Next by Date: Re: Simple totalling of a column with onChange()
- Previous by thread: Re: Waiting for ActiveX object to have initialized
- Next by thread: Re: Waiting for ActiveX object to have initialized
- Index(es):
Relevant Pages
|