External Interface, Internet Explorer and Time Wasted

Dear Googlers,

I leave this message for you in the case that you encounter a similar obstacle to your productivity. Internet Explorers 6, 7 and 8 do not like uppercase letters (or hyphens) in the object ID when embedding a swf into the page if you then plan on using the code with ExternalInterface. They do not like it with SWFObject or with the simple old fashioned object tag. The solution was elusive, but there is some help on the ghettocooler.net Treasure Trove.

The following code will work in Firefox and Safari, but will mysteriously have a problem in Internet Explorer:

[sourcecode language="javascript"] <script language="javascript"> function submitLemon() { var swf = document.getElementById("myContent"); swf.iCanHasParameter('lemon'); }

swfobject.embedSWF("movie.swf", "myContent", "800", "100%", "9.0.124", null, {}, {bgcolor: '#ffffff'}); </script> [/sourcecode]

It will however work if you replace the upper case letter with its lowercase equivalent:

[sourcecode language="javascript"] <script language="javascript"> function submitLemon() { var swf = document.getElementById("mycontent"); swf.iCanHasParameter('lemon'); }

swfobject.embedSWF("movie.swf", "mycontent", "800", "100%", "9.0.124", null, {}, {bgcolor: '#ffffff'}); </script> [/sourcecode]