As you now probably know, Microsoft has released a patch to IE6 because they have failed on appeal to overturn the Eolas patent on browser plug-ins, despite much back and forth and valiant efforts from the W3C.
The effects of this patch are replicated in the latest IE7 browser which is part of Windows Vista.
This is going to primarily affect Flash, Windows Media Player and Java Applets.
AJAX is not affected (You can go back to reading “Getting Real” now ๐ ).
The symptom of this patch is that a user is unable to interact with an embedded object without first acknowledging a tool-tip prompt with a mouse click or key press anywhere to the embedded object.
So, your embedded object (Flash/Windows Media Player etc..) will play and animate, but a user will not be able to click any buttons, enter any text, or activate any rollovers until that first acknowledgement occurs.
Perhaps every time you click, someone at Eolas gets a penny ๐
The prompt for acknowledgement is a small and subtle tool-tip and a highlighted border around the embedded object, both of which are easily missed. You may just notice that you need to click a flash button twice instead of once before you realise what is going on.
Guidance has been provided by Microsoft and Macromedia on how to bypass this problem.
Here is my summary.
Luckily the patent is so specific on how an embedded object is added to a HTML page and activated, it can be easily coded around.
The patch will only affect plug-ins that are
1) Embedded via explicit <embed, <object or <applet elements in a HTML page
2) Written into the page via JavaScript declared in the HTML page
If your elements are written into the page by an external function (a function declared in an included JavaScript file eg. “my_functions.js”) and the function writes this content into the page via a document.write() or some DOM manipulation, then you wonยt trigger the patch.
If you have pages that are affected by this patch then the solution is as follows..
1) Any explicitly embedded <embed <object or <applet elements should be moved into a function in a .js file that gets included by the main page.
2) Any JavaScript in the page that is adding <embed <object or <applet should be wrapped in a function and moved to a .js file that gets included by the main page.
As long as the document.write() is performed in an external function, then your embedded elements will work.
You can generate a string containing the elements in the main page and pass it into an external function that simply does the document.write() for you..
function write_string(p_string)
{
document.write(p_string);
}
And it will not trigger the prompt.
In the future..
- If you are using Flash, it is best practice to use flashObject , if you are not already.
- It is considered A Good ThingTM to have just content markup in your HTML and move all functions and style onto external .css and .js to avoid the dreaded Tag Soup. If you do this already then pat yourself on the back and relax, this patch won’t affect you.
For another solution, follow link for this post. You won’t need to change your HTML source to get rid of the activation requirement, just add a single Javascript include line. This will re-write the OBJECT tags in the browser.