HTML parsing error in IE8(KB927917)

2019-07-13 12:03发布

问题:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727) Timestamp: Wed, 18 Jan 2012 05:02:49 UTC

Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)
Line: 0
Char: 0
Code: 0
URI: http://collaborize.collaborizeclassroom.com/portal/portal/collaborize/site/window?actionEvent=homePage&action=2&fpg=1&unId=umb8N95lhIoXOVKzTTrtcPoCrixd4wMdScQv8mEwqFT962zy3VSh4mzQNeugOWVV&ts=1326862916939&publishUrl=class2&siteName=class2&siteId=20941

I get the above problem only when i open and close the browser and log-in for the first time and even though i delete cache,cookies and history and login again i don't get the problem. is there something else other than the above that gets deleted when we close the browser because the error only comes when i login the first time after i open the browser

回答1:

Example: call document.body.appendChild when the page has not loaded.

Need to call javascript when the page is loaded, example:

document.body.onload = function()
{
    document.body.appendChild(...)
}


回答2:

Add few characters spaces in-between script tags to fix this. ie., space inbetween start and close script tags in case you are referring outside library using src attribute



回答3:

IE takes some time to render elements. In that case, if we are referencing the element in Javascript it will throw this error.

Solution is to check on your Javascript or Jquery codes and use the codes inside the $(document).ready(function() { } function.

It works for me.



回答4:

This is a bug in IE8.try following the method provided below. After using this my problem is resolved.

Reset your Internet Explorer settings and run it. You can do this by following the steps given below. If the problem is caused by damaged or incompatible Internet Explorer settings or add-ons, you can usually resolve the problem by resetting Internet Explorer settings.

To use the Reset Internet Explorer Settings feature from Control Panel, follow these steps:

  1. First of all clear your IE history.
  2. Exit all programs, including Internet Explorer (if it is running).
    If you use Windows XP, click Start, and then click Run. Type the following command in the Open box, and then press ENTER:
    inetcpl.cpl
    If you use Windows Vista, click Start Collapse this imageExpand this image . Type the following command in the Start Search box, and then press ENTER:
    inetcpl.cpl
    The Internet Options dialog box appears.
  3. Click the Advanced tab.
  4. Under Reset Internet Explorer settings, click Reset. Then click Reset again.
  5. When Internet Explorer finishes resetting the settings, click Close in the Reset Internet Explorer Settings dialog box.
  6. After that you have to download the Cumulative Security update for Internet Explorer KB2360131 to resolve this.

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27630 (Windows XP)

OR

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27622 (Windows Vista)

-- Start Internet Explorer again.



回答5:

Not sure if this will be on any help but it might give you an idea of your problem.

I'm still learning js but I got the same problem and only in IE8. I had suspicion that it was the facebook plugin I got from facebook which stated to place the code at the top of page. I removed the code and page loaded without error then added it back and I got the error. I moved the code to the bottom of the page and it worked with no errors. The page even loaded faster.



回答6:

I added the $(document).ready(...) and still had a problem. After further analysis, I isolated the problem to an em value in a CSS media query (I am using respond.js). I have not investigate the root cause further, but I was able to consistently view the page without errors after switching the media query from ems to pixels.



回答7:

The problem happens when JS tried to appendChild to a DOM element that has not finished loading. I fixed with

window.onload=function() {
//append code
}

if the issue is still happening within here I would surmise that the ready code is creating new elements and trying to append children to them before they are loaded.



回答8:

To solve the issue: Please check your source codes, that all the HTML tags are opened and closed properly. If all are fine then you will not get this kind of errors in IE.