ActiveX controls in HTML files

Normally if you include any ActiveX control in an HTML file and browse it using MS Internet Explorer(ActiveX only works in MS IE) it gives you warning about the ActiveX control. Here is a way to avoid this warning problem.

1) Create a .js file and insert the activeX control properties using javascript document.write method

document.write('<OBJECT CLASSID="CLSID:0713E8A2-850A-101B-AFC0-4210102A8DA7" ID="TreeView1" STYLE="HEIGHT: 400px; LEFT: 50px; WIDTH: 300px">');
document.write('<PARAM NAME="LineStyle" VALUE="0">');
document.write('<PARAM NAME="Style" VALUE="7">');
document.write('<PARAM NAME="Appearance" VALUE="1">');
document.write('<PARAM NAME="BorderStyle" VALUE="1">');
document.write('<PARAM NAME="Indentation" VALUE="250">');
document.write('</OBJECT>');

2) Insert the code in the body part in the HTML file.

<script language="Javascript" src="treeview_activex.js" mce_src="treeview_activex.js"></script>

The above code will create a Treeview activeX control, in an HTML page. You can also use Adobe flash and MS Windows Media player activeX controls using the same method.

This entry was posted in Javascript and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>