declaration to javascript ActiveXObject My code has the following declaration:

Convert <object / "> declaration to javascript ActiveXObject

My code has the following declaration:

<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 instantiate the same object, but inside the .js file, and therefore I would like to build this object without using a tag (if possible):

var myObject = new ActiveXObject( *Something goes here* );
+3
source share
2 answers

This is the way to create a new instance:

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

As you can see there is an optional parameter locationthat you can use to access remote ActiveX objects, but read the details about it here: MSDN ActiveXObject (you will find some information at the end of the document).

+2
source

"", . :

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

:

myObject.userText = "hello!";

"userText" .

, .

-2

Source: https://habr.com/ru/post/1712659/


All Articles