0

i am trying to embed ActiveX into html, and to call the function from javascript

<html>
<head>
    <TITLE>NVPlayer</TITLE> 
</head>
<body>
<div>
    <OBJECT   
        ID="NVPLayerCompX"  
        NAME="NVPLayerCompX"
        CLASSID="clsid:320F09DC-6C26-4C18-BCA1-54030E7145B7"  
        CODEBASE="NVPlayerCompX.dll"  
        WIDTH="300"  
        HEIGHT="300">  
    </OBJECT>       
</div>
<div>
    <button type="button" onclick="javascript:launch()">Click me!</button>
</div>

    <script type="text/javascript">
        function launch()
        {
             var myObject = document.getElementById("NVPLayerCompX").object

        }
    </script>
</body>

i am getting null in myObject, do i need to use ActiveXObject? i am new with this issues, what is the meaning of the name property in the object element

what am i missing?

1 Answer 1

2
var myObject = document.getElementById("NVPLayerCompX")

That is your object

Sign up to request clarification or add additional context in comments.

1 Comment

thanks, how can i create the sub classes under this object , is there any blog or something which explain it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.