Friday, June 02, 2006

Eolas Workaround Fails If Triggered From Deferred Script

As a workaround to the gruesome IE Eolas patch, you must write your SWFs into the DOM from an external JavaScript library or other external source. This can happen via a function call within the body of your document, or can be triggered by an onload event.

These two triggers have their downsides. It is often not desirable to put a JS function call within the body of your HTML document, as this makes your code more difficult to maintain. If you have a large site, you probably want a single library that you can snap in and out at will. A lot of function calls sprinkled throughout your site can make it difficult to remove the functionality if you need to.

As far as the onload event goes, it is better to do any DOM manipulation BEFORE document.body.onload, so that if you are replacing images and so forth, they don't need to be completely loaded before they are replaced. It's about bandwidth savings.

So, I thought I'd be clever and trigger my SWF injection script when the DOM is ready, but before the page load completes by using Dean Edwards IE onload solution. Basically, any script that you include with "defer" in the script tag will execute when the DOM has loaded, but before document.body.onload.

Unfortunately, though the swf is injected into the page properly, the Eolas patch is in full effect complete with the "Click to Activate And Use This Control" message. Check out this test page to see it for yourself.

I've tried a bunch of ways around this. It turns out that if the SWF file is already cached, the Eolas garbage goes away, so I could possibly work out some kind of prefetch scheme. If anyone else has come across this and has a solution, let me know!

Was this post helpful to you? If so, please consider making a small donation to keep this blog going.


Anonymous Anonymous said...


I might have something for you. I use a similar method for working around the Eolas junk (probably simpler and less robust, but enough for what we need). I ran into the same surprise - IE7 Beta worked fine; IE7 RC1 doesn't respond to the workaround.

I had one of those great moments where the first idea I had seems to work. I haven't had time to do much testing, at all, so this may be full of holes. In fact, the success I've had _could_ be due to the SWF having been cached, so take this with a measure of caution. Something for you to check out, though, at least.

I don't mess around with deferring anything with the workaround I use - mostly because I don't know anything about that. I create a div container for the Flash object, and then inside of the the div I include JS insertion of my external file, which is just a series of 'document.writeln(...)' statements.

That leaves my onload event totally free - I use that to call a single-line function called 'makeKeyPress'. In that function I just simulate a space-bar keypress.

More disclaimer -- I've never messed around with programatic keypresses in JS, so if this is just a competely uninformed and stupid approach, someone please feel free to say point it out.

Not only was I surprised that this actually seemed to work, but the two pieces seem to require each other - that is, the fake keypress doesn't work on its own, and the injection (as we know) doesn't work on its own.

If you'd like, check out a post on a blog my group maintains --

Hope this turns out to be helpful.

Ross Henderson

12:55 PM  
Anonymous Anonymous said...

I like your blog. Thank you. They are really great . Ermunterung ++ .
Some new style Puma Speed is in fashion this year.
chaussure puma is Puma shoes in french . Many Franzose like seach “chaussure sport” by the internet when they need buy the Puma Shoes Or nike max shoes. The information age is really convenient .

By the way ,the nike max ltd is really good NIKE air shoes ,don’t forget buy the puma mens shoes and nike air max ltd by the internet when you need them . Do you know Nike Air Shoes is a best Air Shoes . another kinds of Nike shoes is better . For example , Nike Air Rift is good and Cheap Nike Shoes .the nike shox shoes is fitting to running.

Spring is coming, Do you think this season is not for Ugg Boots? maybe yes .but this season is best time that can buy the cheap ugg boots. Many sellers are selling discounted. Do not miss . Please view my fc2 blog and hair straighteners blog.
.thank you .

I like orange converse shoes ,I like to buy the cheap converse shoes by the internet shop . the puma shoes and the adidas shoes (or addidas shoes) are more on internet shop .i can buy the cheap nike shoes and cheap puma shoes online. It’s really convenient.
Many persons more like Puma basket shoes than nike air rift shoes . the Puma Cat shoes is a kind of Cheap Puma Shoes .
If you want to buy the Cheap Nike Air shoes ,you can buy them online. They are same as the Nike Air shoes authorized shop. Very high-caliber Air shoes and puma cat shoes . the cheap puma shoes as same as other.

polo shirts

ralph lauren polo shirts
chaussure puma

chaussure sport

chaussures puma

puma CAT

ed hardy clothing

ed hardy clothes

ed hardy womens

ed hardy sunglasses

ugg boots

cheap ugg boots

1:41 AM  

Post a Comment

Links to this post:

Create a Link

<< Home