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....




geoenviAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ZvonkoConnect With a Mentor Systems architectCommented:
Because you used New instead of new.
0
 
geoenviAuthor Commented:
Someone please Kick me...
0
 
ZvonkoSystems architectCommented:
If the life would be always such easy ;-)
0
All Courses

From novice to tech pro — start learning today.