punchbag wrote:[color=blue]
> Hi all,
>
> There has recently been a new update to internet explorer whereby
> activex controls now load on a page unactivated. MSDN have a website
> explaining a workaround where you do away with the <OBJECT> tag in your
> html and instead use an external Javascript the control will load
> activated.
>
>
http://msdn.microsoft.com/library/?u...ng_activex.asp
>
> My old way of doing things was:
>
> <TITLE>ProductOne</TITLE>
> <META NAME = "System" Content="Test">
> </HEAD>
> <BODY>
>
> <OBJECT ID="UserControl1"
> CLASSID="CLSID:7F944D2D-D2FA-4EB7-A214-F2B6482FCD1C"
> CODEBASE="TheCabFile.CAB#version=9,5,1,0">
> </OBJECT>
> </BODY>
> </HTML>
>
> Now i've tried to create my object using an external js like follows
>
> //html file
> <html>
> <body>
> <div id="DivID">
> <script src="createElementExplicit.js"></script>
> </body>
> </html>
>
> //js file
> var myObject = document.createElement('object');
> DivID.appendChild(myObject);
> myObject.width = "500";
> myObject.height = "300";
> myObject.classid= "clsid:7F944D2D-D2FA-4EB7-A214-F2B6482FCD1C";
> myObject.codebase =
> "http://IPAddress/dir1/TheCabFile.cab#version=9,5,1,0";
> myObject.uiMode = "none" ;[/color]
Try to set property first, and DivID.appendChild(myObject) at the very
end.
But it seems to me that you're reading this article wrong. It is not
about forcing object activation even if disabled (what use of disabling
would be then?) AFAICT it is about setting object activation params at
runtime. So if users have "disable ActiveX on page" on, your module
will not be activated no matter what.