I came across a very strange bug in Internet Explorer today, I was using swfobject to embed flash the web standards way, everything worked perfectly well in Firefox, as usual. However, when I tested in IE I got a runtime error saying:
Internet Explorer cannot open the Internet site http://www.domain.com/path/to/file/.
Operation aborted
The problem is you can’t append to the body element from script that isn’t a direct child to the body element. It can be fixed simply by putting defer=”defer” in the script tag.
According to the W3C, the defer attribute:
When set, this boolean attribute provides a hint to the user agent that the script is not going to generate any document content (e.g., no “document.write” in javascript) and thus, the user agent can continue parsing and rendering.