How to Use ActiveX Object Methods With an HTML Object Tag

Written by jim campbell
  • Share
  • Tweet
  • Share
  • Email

An ActiveX object is a small program compatible with Internet Explorer. You use the ActiveX object methods by embedding the object in your HTML files. This is accomplished using the HTML "object and "embed" tags. The ActiveX object is then called when the user loads the webpage in the Internet Explorer browser. These controls are used in corporations that have web-based applications for internal employees.

Skill level:

Other People Are Reading


  1. 1

    Right-click your HTML file on your desktop. Select "Open With." Double-click "Notepad" to open the page in your Notepad text editor.

  2. 2

    Scroll down to the location where you want the ActiveX control to appear on the page. Add the following object tag code:

    <object classid="clsid:YN86FN45-AE3D-33DF-97B8-657483747" codebase="" " id="ActiveXName"> </object>

    CLSID stands for "class ID." The CLSID is specific to the ActiveX control. The developer who gives you the ActiveX control must supply the CLSID, which is different for each control distributed on the Internet. Replace the CLSID with your own. Replace "codebase" with the location of the CAB file, which is the installation file for the ActiveX control, if the user does not have it installed on his computer. Replace the "ActiveXName" with your own ActiveX control name.

  3. 3

    Add the "embed" tag within the object tag created in Step 2. In this example, a method called "my_method" is called. Type the following code into the file within the object open and closing tags:

    <embed href="/activex/file.ocx?method=my_method" quality=high bgcolor=#FFFFFF NAME="ActiveXName" ></embed>

    Replace "my_method" with the method you want to call. Replace "/activex/file.ocx" with the location of the OCX ActiveX file. Replace "ActiveXName" with the same name you specified in step two.

  4. 4

    Click the "File" menu item and then select "Save." Double-click the file on your hard drive to open it in Internet Explorer to test the new changes.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.