Reputation: 1696
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?
Upvotes: 0
Views: 1248
Reputation: 2415
var myObject = document.getElementById("NVPLayerCompX")
That is your object
Upvotes: 2