Date: 2009jul8
Q. How do I use a COM object (.OCX file) aka ActiveX in Internet Explorer?
A. Use <object> with your class id.
<script>
var gObj;
function init() {
gObj = document.getElementById('myocx');
gObj.MyMethod1();
}
</script>
<body onload="init()">
<object classid="clsid:00000000-0000-0000-0000-000000000000" id="myocx" width="200" height="200">
</object>
<button onClick="gObj.MyMethod2()">MyMethod2</button>
</body>
This does *not* work in Firefox or other browsers.
| What this info useful to you? You can donate to say thanks |
Add a comment
Sign in to add a comment