| home / programming / javascript / j_s / column5 / 1 | [next] |
|
|
Except for security fixes, Microsoft has steadfastly refused to make any other updates to IE6 in the past 3 years, although it has fallen farther behind its two main competitors, Mozilla and Opera, in features/functionality, standards compliance and reliability/performance. A recent court decision against Microsoft by Eolas Technologies and the University of California at Berkley has changed the situation, though the 500 million dollar award is being appealed by Microsoft. However, Redmond is immediately changing some of the offending coding constructs. Interestingly, Microsoft will limit the changes in IE6 to patches, security repairs and the new compliance fixes – no fixes to JavaScript, CSS, DOM, and HTML non-compliance. Here, we examine those patent workaround fixes in more detail and what they mean to Web developers.
Despite the fact that the jury decision is under appeal and that the patent is being re-examined, Microsoft has taken a curious position on what action to take with the patent infringing code. Microsoft met with W3C officials on what to do; but then adopted a single minded and somewhat invasive fix for the problem. To make matters more obscure, no information (on why this approach was taken) is available on the Microsoft site. Unfortunately, web developers are the casualties and bear the brunt of the collateral damage in the intellectual property wars. In short, you have some unscheduled repairs to make if your programs use the <applet> (Java applet invocation), <embed> (Flash and other rich media invocation like Apple's Quicktime) or <object>tags (ActiveX and other active or dynamically invoked content).
The Microsoft fixes will be introduced in early 2004 and will involve changes to IE that will be distributed with all versions of Windows that get shipped after the fix date (not finalized yet). It will also apply to all downloads of IE and Windows updates and service packs. The basic nature of the fix is that the <applet>, <embed> and <object> tags, upon loading in a HTML page, will cause an alert to be issued and users will be asked if they want to download the associated applet, Flash control, Activex or other dynamic content. This is to ensure that all Web programs will continue to work properly. Unfortunately, as a result of the IE6 fix, users will have to approve of each piece of dynamic content unless some workarounds are applied.
There are two JavaScript workarounds. These scripts dynamically load the <applet>, <embed>, or <object> tags into the web page with the intention of bypassing the Eolas/UCal patents. This restores the seamless operation of the active or dynamic content. IE will not stop and ask permission to load the content, but will seamlessly execute the dynamic content.
The following is an example of what is involved using a movie object embedded in one of your web pages:
<object classid="clsid:02BF9699..." ...>
<param name="src" value="SomeMovie.mov">
</object>
You will now have to replace that code with a script statement like this one:
<script language="JavaScript"type="text/javascript"
>
LoadSomeMovie();</script>
Then at the top of your Web page in the <head> section you should have the following <script> statement that points to the external .JS javascript file that will contain the LoadSomeMovie() function. Important note – this must be an external JavaScript file. If you try to save coding by bringing the dynamic <script> statement into your Web Page, the new IE will ignore the dynamic load statement and still prompt the user. The key to the patent workaround is to use an external JavaScript file to dynamically load the <applet>, <embed>, and <object> tags. Here is the <script> statement required:
<script src="[path]/LoadMovie.js" language="JavaScript" type="text/javascript"></script>
Note [path] will likely be blank but should be set to the directory containing your JavaScript files. The LoadMovie.js file will contain the following JavaScript code:
function LoadSomeMovie()
{
document.write('<object classid="clsid: 02BF9699..." ...>\n');
document.write('<param name="src" value="SomeMovie.mov"
/>\n');
document.write('</object>\n');
}
| home / programming / javascript / j_s / column5 / 1 | [next] |
| ||||||||||||||||||||
Created: June
2, 2003
Revised: December 18, 2003
URL: http://webreference.com/programming/javascript/j_s/column5/1