Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert <object /> declaration to javascript ActiveXObject

I have the following declaration in my code:

<object id="myObject" name="myObject" 
    data="data:application/x-oleobject;base64,ab9qcMENN0WE41oij7hs8764yu+YEwAA2BMABB=="
    classid="clsid:83A04F76-85DF-4f36-A94E-BA3465007CDA" viewastext
    codebase="someAssembly.dll#version=UNKNOWN">
</object>

I want to create an instance of this same object, but inside a .js file, and so I'd like to construct this object without needing to use an tag (if this is even possible):

var myObject = new ActiveXObject( *Something goes here* );

1 Answers

This is the way to create a new instance:

var newObj = new ActiveXObject(servername.typename[, location]);

As you can see there's an optional parameter location that you can use to access remote ActiveX objects but read details about it here: MSDN ActiveXObject (you'll find some info at the end of the document).

like image 102
Robert Koritnik Avatar answered Nov 26 '25 00:11

Robert Koritnik



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!