Short Way To Disable ActiveX Control for IE on SWF files

Discussion in 'HTML & Website Design' started by BOOMBOOM, Oct 5, 2007.

  1. #1
    Ok,

    So I have come across a bit of an issue on ActiveX Control with IE and looked for the script to disable this retarded crap...

    All tutorials I found have a huge .js file to call to from the </object> tag...

    I have a much, much shorted JS script for this and here it is...

    First, create a new JS file called ieupdate.js

    Paste this code there:

    theObjects = document.getElementsByTagName("object"); 
    for (var i = 0; i < theObjects.length; i++) { 
    theObjects[i].outerHTML = theObjects[i].outerHTML; 
    }
    Code (markup):

    Then go to the page with the SWF file and go to the closing </object> tag and paste this there:

    <script type="text/javascript" src="ieupdate.js"></script>
    Code (markup):

    walla, all done and little variables with no huge ridiculous JavaScript

    :)
     
    BOOMBOOM, Oct 5, 2007 IP
  2. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #2
    I'm not a JS guy, but wouldn't it be better to wrap it in conditionals or check if the browser is IE first, rather than make some other browsers do more work then is needed?

    You said go to the closing </object> and run it... well what if you have multiple objects? Will it work for objects that appear later on?

    Shouldn't you test if the length of your variable (theObjects) is set at all, or higher than 0?

    And I've used InnerHTML for XHR, but I've never seen outerHTML used.. could you link to some of the larger scripts that you've seen use it? Do they implement them the same way?
     
    soulscratch, Oct 5, 2007 IP
  3. BOOMBOOM

    BOOMBOOM Peon

    Messages:
    196
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Sounds like you know more than me, so you should be the one answering your questions with the tool you know how to use... GOOGLE..

    All I know is I was recently faced with this particular obstacle and over came by implementing the solution I have provided to the rest of the family...

    "You said go to the closing </object> and run it... well what if you have multiple objects? Will it work for objects that appear later on?"

    To answer this, you would have multiple objects, so you would have to implement on each one.... Or I'm sure you can find a way to implement on all objects, if that is what you desire...

    I should be asking you questions... :)
     
    BOOMBOOM, Oct 5, 2007 IP
  4. lespaul00

    lespaul00 Peon

    Messages:
    283
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    This doesn't seem to work for me. I created the .js you mentioned, and saved it in my website's folder (i guess this may be the wrong location).

    Here is my code for my .swf:

            <object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,0,0" width="590" height="300" title="intro">
              <param name="src" value="flash/movie.swf" />
              <embed src="flash/movie.swf" pluginspage="http://www.macromedia.com/shockwave/download/" width="590" height="300"></embed>
          <script type="text/javascript" src="ieupdate.js"></script></object>
    Code (markup):
    What am I missing?

    For reference, my website is www.drmixology.com
     
    lespaul00, Nov 22, 2007 IP
  5. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #5
    Microsoft broke down & licensed the technology.
    Microsoft plans to drop "click to activate" in April of 2008.
     
    joebert, Nov 22, 2007 IP
  6. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Yup, and besides, the EMBED element isn't even in the HTML specification anyway.
     
    Dan Schulz, Nov 22, 2007 IP