Search

Fixing The "Click To Activate" Flash Content In IE

0 views

In the good name of internet security, Microsoft added a feature in Internet Explorer that disables automatic activation of objects. All objects in an HTML <object> tag is affected and that includes Java applets and Adobe Flash content. That means you manually have to click a Flash movie in order to activate it before you can use it.

<body onload="ActivateFlash();"> Of course, this is not a good solution, because you probably already have an included JavaScript file and don't want scripts mixed with your HTML. The obvious choice is to add the script to your .js file, and then add an event handler, so you don't need to call it with an onload-command from the tag. Copy the function into your .js file and add the event handler line in top of that file: window.onload = ActivateFlash function ActivateFlash() {     var objects = document.getElementsByTagName("object");     for (var i = 0; i By doing it this way, you don't have to pollute you're HTML with JavaScript in order to eliminate the Flash activation in Internet Explorer.

Suggest a Correction

Found an error or have a suggestion? Let us know and we'll review it.

Share this article

Comments (0)

Please sign in to leave a comment.

No comments yet. Be the first to comment!