Community Forum

Is there an event notification for the factory object loading?

Profile Image 2 Posts 2 Karma
thompsa posted this 11 October 2013

Hi,

 

Is there a javascript event I can hook on to when the object is instantiated? I need to show the user a dialog box once they have installed the activex control. Something like

f = document.getElementById("factory");f.addEventListener("onStateChange","factoryReady");
Profile Image 23 Posts 23 Karma
Admin
petecole posted this 11 October 2013

Hi

factory doesnt fire our own event during instantiation/loading, but the object tag will support readystate changes, so for example the document object does not enter the readystate until the factory object is ready.

You could try addEventListener("readystatechange","factoryReady")

However, I'm not sure how you will know the difference between object instantiation and installation.

Regards
Pete Cole

 

Profile Image 2 Posts 2 Karma
thompsa posted this 14 October 2013

Hi,

Using readystatechange is working for me, I didnt need to know the difference between instantiation and installation, just that it was available. Using a timeout wasnt working out as it could take the user 10s of seconds to do the install.

thanks,

Andrew