Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4582900
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T21:08:23+00:00 2026-05-21T21:08:23+00:00

Solution: The problem below was caused by a Divx javascript that overwrote a core

  • 0

Solution: The problem below was caused by a Divx javascript that overwrote a core javascript function. Thanks to aeno for discovering this and shame on the Divx coder who did that!

Problem: Clicking the insert image button in the tinymce toolbar does nothing in IE8.

Description: Bear with me here. I don’t think the issue is with tinymce and it’s probably the fault of IE8, but I need help from someone wiser than me in solving the final piece of the puzzle to figure out who is responsible for this…

So basically I’m using tinyMCE with Visual Studio 2010 and I get the problem as described above. So I switch to the tinyMCE source code to debug this. The problem seems to happen in this piece of the code in the inlinepopups/editor_plugin_src.js, line 358:

_addAll : function(te, ne) {
    var i, n, t = this, dom = tinymce.DOM;

    if (is(ne, 'string'))
        te.appendChild(dom.doc.createTextNode(ne));
    else if (ne.length) {
        te = te.appendChild(dom.create(ne[0], ne[1]));

        for (i=2; i<ne.length; i++)
        t._addAll(te, ne[i]);
    }
},

the exact line of code being,

te = te.appendChild(dom.create(ne[0], ne[1]));

In IE8 te becomes null because te.appendChild returns nothing.

To give some background on the the code, te is a DOM.doc.body object and ne seems to be a json object containing the structure of the inline popup object that needs to be created.

So back to the code.. this works with all other browsers no problem. So I step into the function appendChild and I’m brought to some “JScript – script block [dynamic]” file that does the unthinkable. It overrides the doc.body.appendChild function… You can see it below,

code cut out
...
    var appendChildOriginal = doc.body.appendChild;
    doc.body.appendChild = function(element)
    {
        appendChildOriginal(element);
        var tag = element.tagName.toLowerCase();

        if ("video" == tag)
        {
            ProcessVideoElement(element);
        }
    }
...
code cut out

Here we can obviously see what went wrong. Of course te.appendChild returns nothing… it has NO RETURN STATEMENT!

So the final piece to this puzzle is wtf is this dynamic script block? I can’t for the love of god figure out where this script block is coming from (VS2010 is not helping). My deepest suspicions are that this is IE8 in built? Can anyone shed some light on this? Below I’m providing a little bit more of this mysterious script block in case anyone can figure out where it’s from. I can promise you something right now, it doesn’t belong to any of the scripts in our project since we’ve done a search and we turn up with nothing.

var doc;
var objectTag = "embed";

// detect browser type here
var isInternetExplorer = (-1 != navigator.userAgent.indexOf("MSIE"));
var isMozillaFirefox = (-1 != navigator.userAgent.indexOf("Firefox"));
var isGoogleChrome = (-1 != navigator.userAgent.indexOf("Chrome"));
var isAppleSafari = (-1 != navigator.userAgent.indexOf("Safari"));

// universal cross-browser loader
if (isInternetExplorer)
{
   // use <object> tag for Internet Explorer
   objectTag = "object";
   // just execute script
   ReplaceVideoElements();
}
else if (isMozillaFirefox)
{
    // listen for the 'DOMContentLoaded' event and then execute script
   function OnDOMContentLoadedHandled(e)
   {
       ReplaceVideoElements();
   }

   window.addEventListener("DOMContentLoaded", OnDOMContentLoadedHandled, false);
}
else if (isGoogleChrome)
{
   // just execute script
   ReplaceVideoElements();
}
else if (isAppleSafari)
{
    // listen for the 'DOMContentLoaded' event and then execute script
function OnDOMContentLoadedHandled(e)
{
       ReplaceVideoElements();
}
window.addEventListener("DOMContentLoaded", OnDOMContentLoadedHandled, false);
}

function MessageHandler(event)
{
    //window.addEventListener("load", OnLoad, false);
}

// replacing script
function ReplaceVideoElements()
{
    if (isMozillaFirefox)
    {
        doc = window.content.document;
    }
    else
    {
        doc = document;
    }

    // set up DOM events for Google Chrome & Mozilla Firefox
    if (isMozillaFirefox || isGoogleChrome || isAppleSafari)
    {
        doc.addEventListener("DOMNodeInserted", onDOMNodeInserted, false);
        doc.addEventListener("DOMNodeInsertedIntoDocument", onDOMNodeInsertedIntoDocument, false);
    }
    // HACK : override appendChild, replaceChild, insertBefore for IE, since it doesn't support DOM events
    if (isInternetExplorer)
    {
        var appendChildOriginal = doc.body.appendChild;
        doc.body.appendChild = function(element)
        {
            appendChildOriginal(element);
            var tag = element.tagName.toLowerCase();

            if ("video" == tag)
            {
                ProcessVideoElement(element);
            }
        }

        var replaceChildOriginal = doc.body.replaceChild;
        doc.body.replaceChild = function(element, reference)
        {
            replaceChildOriginal(element, reference);
            var tag = element.tagName.toLowerCase();

            if ("video" == tag)
            {
                ProcessVideoElement(element);
            }
        }

        var insertBeforeOriginal = doc.body.insertBefore;
        doc.body.insertBefore = function(element, reference)
        {
            insertBeforeOriginal(element, reference);
            var tag = element.tagName.toLowerCase();

            if ("video" == tag)
            {
                ProcessVideoElement(element);
            }
        }
    }
...
code cut out
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T21:08:24+00:00Added an answer on May 21, 2026 at 9:08 pm

    HI,

    I’m dealing with the exact same problem occuring when opening a prettyPhoto gallery…
    I have no idea where this “script block” is coming from, but it definitely causes the error.

    So, does anyone know anything on this suspicious script block?

    Thanks,
    aeno

    edit:
    A little more googling shed some light onto it: The mentioned script block comes from the DivX plugin that’s installed in InternetExplorer. Deactivating the DivX plugin suddenly solved the problem and prettyPhoto opens quite smooth 🙂

    Now I have to figure out whether the DivX developers have bug tracker…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I notice in several API's, that you may create a struct which is used
I'm trying to build a Chrome browser extension, that should enhance the way the
There doesn't seem to be any tried and true set of best practices to
After having read Ian Boyd 's constructor series questions ( 1 , 2 ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.