June 9, 2006

IE FIX - Click to activate this control

You will find other articles relevant to this document in these sections:
Cameron Manderson @ 2:43 pm

For Webdevelopers

Simple quick fix for an issue aftecting webdevelopers after Microsoft lost a legal battle over embedding active-x elements.

This is affecting embedded Active-X elements such as Flash/QuickTime/RealPlayer/Java Applets/PDF’s.

Under IE a message appears “click to activate and use this control“.

A fix for this a recommendation has been made to use the following snippet of JavaScript:

<script type="text/javascript" language="JavaScript">
// Obtain a list of all the "objects"
var documentObjects = document.getElementsByTagName("object");
// Loop throught the items and reassign the outerHTML
for(var x = 0; x < documentObjects.length; x++) documentObjects[x].outerHTML = documentObjects[i].outerHTML;
</script>

This code needs to be copied into your section of your HTML page. As this relies on JavaScript your users will have to have it enabled. Typically this only affects around 10% of browsers (according to W3C as of January 2006).

You can create a file called “IEActiveXFix.js” and copy the contents between the script tags into the file. You can then “include” this with the following at any stage:

<script language="JavaScript" type="text/javascript" src="IEActiveXFix.js"></script>

You could also make use of the following conditional include:

<!--[if lte IE 7]>
<script language="JavaScript" type="text/javascript" src="IEActiveXFix.js"></script>
<![endif]-->

For end-users

Visit http://support.microsoft.com/default.aspx/kb/917425 to download a patch.

Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • Furl
  • Reddit
  • YahooMyWeb

1 Comment »

  1. I am using Object Activator to re-activate my objects. It’s fast and easy:

    http://www.orontesprojects.com/objectactivator.htm

    Mark

    Comment by Mark Jennings — August 8, 2007 @ 2:30 am

RSS feed for comments on this post. TrackBack URI

Leave a comment