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:
Right-click your HTML file on your desktop. Select "Open With." Double-click "Notepad" to open the page in your Notepad text editor.
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="http://yourdownload.com/cabfile" " 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.
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.
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.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for