P
punchbag
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/?url=/workshop/author/dhtml/overview/activating_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" ;
I cannot get this to work. If the user has the old control on their
machine it works fine and gets around this new problem of activating
the component. But where its a new installation, it does not download
the cab and install the control. Can any of you JavaScript/ActiveX
guru's help me out on this one? I feel that my js is wrong. Like can i
use myobject.codebase, i;m really trying to improvise the code on the
msdn website here to no avail so any help would be greatly appreciated,
Thanks
Bren
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/?url=/workshop/author/dhtml/overview/activating_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" ;
I cannot get this to work. If the user has the old control on their
machine it works fine and gets around this new problem of activating
the component. But where its a new installation, it does not download
the cab and install the control. Can any of you JavaScript/ActiveX
guru's help me out on this one? I feel that my js is wrong. Like can i
use myobject.codebase, i;m really trying to improvise the code on the
msdn website here to no avail so any help would be greatly appreciated,
Thanks
Bren