This is my solution: /** * FAXA v1.0 -- Fix ActiveX Activation, IE and Eolas patent patch click-to-activate issue * by Adam Burmister, Flog.co.nz, 2006 * * ABOUT: * This script is designed to be a simple drop in fix for the click-to-activate issue in IE. * Due to recent patent issues with Eolas, Microsoft has issued a patch which required users to * click a web control to activate it (this are ActiveX controls, Flash, Windows Media, Quicktime, etc). * * Microsofts suggested resolution was to include a javascript block for each of these elements on * the page which uses document.write() to write the control's HTML. This is horribly dirty. * This script uses the same idea (creating controls programatically to bypass the click-to-activate), but * does it in a good way. It simply recreates each ActiveX element on the page based on it's current * HTML declaration. * * This means... * - no ugly instance specific javascript blocks * - users without javascript can see the activex elements (but will have to click to activate) * - a simple conditional include file in a page header automatically fixes the problem * * USAGE: * Simply include the following IE conditional comment to include the javascript file at the top of * every page with ActiveX controls you want to fix: * * <!--[if IE]> * <script type="text/javascript" src="faxa.js" defer="defer"></script> * <![endif]--> */
/* list of offending elements to fix */ var offenders = ["object","embed","applet"]; /* foreach offender */ for(var j=0; j<offenders.length; j++){ /* get a collection of instances on page */ var instances = document.getElementsByTagName(offenders[j]); /* foreach instance */ for (var n=0; n<instances.length; n++) { /* recreate the instance */ instances[n].outerHTML = instances[n].outerHTML; } } /* This could be compacted to one line (160 bytes): var o=["object","embed","applet"],j,k;for(j=0;j<o.length;j++){var e=document.getElementsByTagName(o[j]);for(k=0;k<e.length;k++){e[k].outerHTML=e[k].outerHTML;}} */ ________________________________________ From: listdad@webstandardsgroup.org [mailto:[EMAIL PROTECTED] On Behalf Of Helmut Granda Sent: Wednesday, 31 May 2006 7:37 a.m. To: wsg@webstandardsgroup.org Subject: RE: [WSG] IE7 Flash You don't have to train your users to click on flash content twice, with a little of JS magic everything is solved: http://blog.deconcept.com/swfobject/ I have used and I know a lot of people have used too, it validates and works like a charm. ...helmut From: listdad@webstandardsgroup.org [mailto:[EMAIL PROTECTED] On Behalf Of Berman, Pamela E Sent: Tuesday, May 30, 2006 1:50 PM To: wsg@webstandardsgroup.org Subject: RE: [WSG] IE7 Flash The same thing happens in IE 6. Our team was just discussing how to let our learners know they need to click twice for some of our training. It is confusing to some people. A couple of people have asked me about it. If there is an answer, I'd love to pass it along. Pam Berman ________________________________________ From: listdad@webstandardsgroup.org [mailto:[EMAIL PROTECTED] On Behalf Of Shawn Cassick Sent: Tuesday, May 30, 2006 2:28 PM To: wsg@webstandardsgroup.org Subject: [WSG] IE7 Flash I am sure many of you have ie7 beta2 installed, and I am sure most of you have noticed it makes you click active-x content to activate it. This leads me to my question, I am doing a site for a band, they want a flash intro, but with ie7 the intro would be rather worthless considering the end user would have to click the content to activate it. Does anyone have a tidbit of code that would just bypass ie7's ability to block the content and just let it play? Shawn Cassick dVious designs ****************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************