1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Flash Activation Fix for Internet Explorer

Discussion in 'Web Design & Development' started by deepdiver01, Feb 2, 2007.

Thread Status:
Not open for further replies.
  1. deepdiver01

    deepdiver01 Thread Starter

    Joined:
    Dec 22, 2004
    Messages:
    721
    The following code is used to override the necessity to click on a flash object in Internet Explorer to activate it.

    This code is compliments of another help site that specialises in javascript.

    First, create a file and name it fixFlash.js.
    This file can be placed in the public area of your site or, preferrably in a separate folder for your javascript files.

    Paste the following code into the fixFlash.js file:

    Code:
    window.onload = function() {
      fixFlash(); }
        function fixFlash() {
         objects = document.getElementsByTagName("object");
         for (var i = 0; i < objects.length; i++)
       {
      objects[i].outerHTML = objects[i].outerHTML;
    }
    }
    Now place the following code into the HEAD section of your HTML or PHP document.
    You may need to change the path of the file, depending on the name of the folder for your javascripts.

    Code:
    <!-- fixes the Internet Explorer ActiveX update 912812 which prevents third party plugins
     from running automatically -->
    <!--[if IE]>
    <script type="text/javascript" src="js/fixFlash.js"></script>
    <![endif]-->
    I am sure that a lot of you will already have this fix, but for those that do not, I hope this helps.

    I have also posted this tip in the tips and tricks section of the forums. If this is considered double posting, please feel free to slap my hand and remove the offending post(s). :p

    Cheers.
    Deep.
     
  2. namenotfound

    namenotfound

    Joined:
    Apr 30, 2005
    Messages:
    3,012
    Cool. I've been using swfobject (google it). But this seems worth trying out :)

    Edit: Erm.... doesn't seem to work very well. IE isn't even loading the object.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/540591

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice