Accessing ActiveX Controls : ActiveX « Development « JavaScript DHTML






Accessing ActiveX Controls

<HTML>
<HEAD>
<TITLE>Accessing ActiveX Components</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function accessActiveX() {
 var newValue = (1000*Math.random()) % 101
 ProgressBar1.Value = newValue
 Slider1.Value = newValue
}
</SCRIPT>
</HEAD>
<BODY onLoad='setInterval("accessActiveX()",2000)'>
<P><I>Note this page requires Internet Explorer 5.0.</I></P>
    <OBJECT ID="ProgressBar1" WIDTH=400 HEIGHT=33
     CLASSID="CLSID:0713E8D2-850A-101B-AFC0-4210102A8DA7">
        <PARAM NAME="_ExtentX" VALUE="10583">
        <PARAM NAME="_ExtentY" VALUE="873">
        <PARAM NAME="_Version" VALUE="327682">
        <PARAM NAME="Appearance" VALUE="1">
    </OBJECT>
<P>
    <OBJECT ID="Slider1" WIDTH=400 HEIGHT=33
     CLASSID="CLSID:373FF7F0-EB8B-11CD-8820-08002B2F4F5A">
        <PARAM NAME="_ExtentX" VALUE="10583">
        <PARAM NAME="_ExtentY" VALUE="873">
        <PARAM NAME="_Version" VALUE="327682">
        <PARAM NAME="Max" VALUE="100">
    </OBJECT>
</BODY>
</HTML>
           
       








Related examples in the same category

1.Using ActiveX Components with JScript (Note this page requires Internet Explorer 5.0 or later)
2.Using JScript to Interact with ActiveX Controls