Get rid of "Click to activate and use this control"
The latest browsers have changed the way to handle the rendering of ActiveX components. When an ActiveX component needs to be rendered, a message with "Click to activate and use this control" will be shown to the user. This is good for security but can be frustating for the users of your site.
It is possible to avoid this by setting the ActiveX component via an external script. So in case of having your object tag in your html page, you need to put it in a .js file OUTSIDE the HTML page (it does not work when generated inside the html page) and reference it from your html/aspx page.
Here is an example:
Content of the html page which has a loads the content of a javascript file:
<html>
<body>
...
<script type="text/javascript" language="javascript" src="script.js"></script>
...
</body>
</html>
Content of the script.js file:
document.write("<object id='myApplet' classid='MyActiveX.dll#Namespace.ClassName'></object>");
In case of using a JavaScript file, it is also possible to do the same via an innerHTML or via the DOM as long as you add the object from outside the HTML page.
4 comments:
Hi Geert,
It's not related to a browser version but due to KB912945 and the way how IE handles ActiveX controls idd.
You can get more informations there.
Greets,
Stéphane.
Thanks for the info!
So it depends whether your company wants to install the KB or not which is a matter of security.
Hi Geert!
Since 2006, i am developing a JavaScript fix for this issue. Can look it in http://jactivating.sourceforge.net
:D
I am using Object Activator to re-activate my objects. It's fast and easy:
http://www.orontesprojects.com/objectactivator.htm
Mark
Post a Comment