Results 1 to 2 of 2

Thread: IE Active X control override Script

  1. #1
    Join Date
    Jun 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy IE Active X control override Script

    Hello,

    Apperantly there was a law suit on microsoft and they lost so changes had to be made.

    I quote for this site, http://capitalhead.com/1239.aspx

    "If you’re an Internet Explorer user and have recently encountered a “Click to activate and use this control” tool-tip which forces you to click on any ActiveX control, such as Flash, Java Applets, Media Player and other objects then you’re not alone".

    This is My Computer & I assume Other people using IE that keep the Internet Explorer version up to date with automatic updates. The problem is from the April Security update (KB912812) but it can't be removed because there are other things in there and this would only fix my computer. Also, all future updates were based on this update being there when I tried to remove this update(KB912812) it said that 7 other (it listed them) updates will be affected-continue anyway? N/G.

    I know one of these scripts will help but I can't figure out how to put them on my pages, can someone help?
    The following examples demonstrate a number of techniques for web developers using JavaScript to embed the controls into the browser at load time.

    Using get Elements By Gag Name method
    Below your last <object> insert the following JavaScript line which calls ie fix.js:

    <script type="text/javascript" src="iefix.js"></script>

    // iefix.js
    objects = document.getElementsByTagName("object");
    for (var i = 0; i < objects.length; i++)
    {
    objects[i].outerHTML = objects[i].outerHTML;
    }

    Using document.write to load the control
    <!-- HTML File -->
    <html>
    <body leftmargin=0 topmargin=0 scroll=no>
    <script src="Embed.js"></script>
    </body>
    </html>

    // embed.js
    document.write('<embed src="examplecontrol">')

    Using outerHTML to load the control
    <!-- HTML File -->
    <html>
    <body>
    <div>
    <script src="embedControlOuterHTML.js"></script>
    </div>
    </body>
    </html>

    // embedControlOuterHTML.js
    embedControlLocation.outerHTML = '<embed src="examplecontrol">';

    Using document.createElement to load the control
    <!-- HTML File -->
    <html>
    <body>
    <div id="DivID">
    <script src="createElementExplicit.js"></script>
    </body>
    </html>

    // createElementExplicit.js
    var myObject = document.createElement('object');
    DivID.appendChild(myObject);
    myObject.width = "200";
    myObject.height = "100";
    myObject.classid= "clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6";
    myObject.URL = "example.wmv";
    myObject.uiMode = "none" ;

    Please note: You must initialize the attributes and add the object to the page's DOM before creating the ActiveX control to be loaded by the new element.

    Using innerHTML to load the control
    <!-- HTML File -->
    <html>
    <head>
    <script src="external_script.js" language="JScript"></script>
    </head>

    <body>
    <div id="EXAMPLE_DIV_ID">
    This text will be replaced by the control
    </div>
    <script language="JScript">
    CreateControl( "EXAMPLE_DIV_ID",
    "clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6",
    "EXAMPLE_OBJECT_ID", "600", "400", "example.wmv",
    "-1")
    </script>
    </body>
    </html>

    // external_script.js
    function CreateControl(DivID, CLSID, ObjectID,
    WIDTH, HEIGHT, URL, AUTOSTART)
    {
    var d = document.getElementById(DivID);
    d.innerHTML =
    '<object classid=' + CLSID + ' id=' + ObjectID +
    ' width=' + WIDTH + ' height=' + HEIGHT +'>
    <param name="URL" value=' + URL + '>
    <param name="autoStart" value=' + AUTOSTART + '/>';
    }

    Portions of this code were taken from the Microsoft website.

    Help inserting anyone of these scripts would be greatly appreciated
    Frank

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Ah, wonderful. Microsoft screwing things up again. What fun
    And... sorry, I don't know much about ActiveX.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •