Link to home
Start Free TrialLog in
Avatar of geoenvi
geoenvi

asked on

New ActiveX object creation question

Hi
I tried creating an instance of an object using the following
var myobj = New ActiveXObject("MyDll.thisobject") and it failed
Tried this
var myobj = New ActiveXObject("clsID:3e456789jfjh822334") and it failed

Tried this
<object classID="clsID:3e456789jfjh822334" id=myobj></object>
and it worked so I could refer to this in my Javascript like myobj.myproperty=10

Why does the first way of instancing the object fail and why did the second work?  BTW The first method of instancing worked on a different laptop.

I thought that the object tag is to embed visual controls into HTML and then manipulate but the preferred way of instancing a non visual COM object was using the New syntax.

Please explain....




ASKER CERTIFIED SOLUTION
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of geoenvi
geoenvi

ASKER

Someone please Kick me...
If the life would be always such easy ;-)