Using JScript to Interact with ActiveX Controls : ActiveX « Development « JavaScript DHTML

Home
JavaScript DHTML
1.Ajax Layer
2.Data Type
3.Date Time
4.Development
5.Document
6.Dojo toolkit
7.Event
8.Event onMethod
9.Ext JS
10.Form Control
11.GUI Components
12.HTML
13.Javascript Collections
14.Javascript Objects
15.Javascript Properties
16.jQuery
17.Language Basics
18.Mochkit
19.Mootools
20.Node Operation
21.Object Oriented
22.Page Components
23.Rico
24.Scriptaculous
25.Security
26.SmartClient
27.Style Layout
28.Table
29.Utilities
30.Window Browser
31.YUI Library
JavaScript DHTML » Development » ActiveX 
Using JScript to Interact with ActiveX Controls


<html>
<head>
  <title>JavaScript Unleashed</title>
  <script type="text/javascript" for="CommandButton1" event="Click()">
  <!--
    var msg = "This is a button";
    var altMsg = "This is another button";
    if(CommandButton1.Caption == msg){
      CommandButton1.Caption = altMsg;
      window.defaultStatus = altMsg;
    }else{
      if(CommandButton1.Caption == altMsg){
        CommandButton1.Caption = msg;
        window.defaultStatus = msg;
      }
    }
  //-->
  </script>
</head>
<body>
  <object id="CommandButton1" width="98" height="32"
    classid="CLSID:D7053240-CE69-11CD-A777-00DD01143C57">
    <param name="VariousPropertyBits" value="268435483">
    <param name="Caption" value="This is a button">
    <param name="Size" value="209;678">
    <param name="FontCharSet" value="0">
    <param name="FontPitchAndFamily" value="2">
    <param name="ParagraphAlign" value="3">
    <param name="FontWeight"  value="0">
  </object>
</body>
</html>

           
       
Related examples in the same category
1. Accessing ActiveX Controls
2.Using ActiveX Components with JScript (Note this page requires Internet Explorer 5.0 or later)
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.