SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Wizard billy_111's Avatar
    Join Date
    Jul 2009
    Posts
    1,683
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTML Parsing Error

    Hey,

    I have created a website and it worked fine when it was in the testing phases. But now ive set it live and suddenly it does not work properly in IE7 & 8..

    What happens is when i try to navigate using the drop down menu, i keep getting this error, it appears in the bottom left of the web browser:-

    PHP Code:
    [B]Webpage error details[/B]

    MessageHTML Parsing ErrorUnable to modify the parent container element before the child element is closed (KB927917)
    Line0
    Char
    0
    Code
    0
    URI
    http://www.meyselections.com/intro.php 
    I dont understand what this means..

    Can anyone help, it only does this in IE, works fine in Mozilla Fx

  2. #2
    SitePoint Wizard billy_111's Avatar
    Join Date
    Jul 2009
    Posts
    1,683
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey,

    Does anybody know why i am receiving this error?

    I have looked around and the problem seems to be JavaScript. I currently have Lightbox so does that make a difference?

    If so, how can i overcome this?

    Thanks
    Regards

  3. #3
    Resident curmudgeon bronze trophy gary.turner's Avatar
    Join Date
    Jan 2009
    Location
    Dallas
    Posts
    990
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have tried the url in both IE7 and IE8, navigating to several pages in each with the dropdown menus. I did not get any error messages.

    Can you provide more specific information?

    cheers,

    gary
    Anyone can build a usable website. It takes a graphic
    designer to make it slow, confusing, and painful to use.

    Simple minded html & css demos and tutorials

  4. #4
    SitePoint Wizard billy_111's Avatar
    Join Date
    Jul 2009
    Posts
    1,683
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey,

    Thats weird..

    Basically this is exactly what happens..

    IE7 - when im on the homepage i dont see any problems, BUT when i try navigating to another page using the drop down menu, i get this pop up error message:-

    "Internet Explorer cannot open the internet site, http://www.meyselections.com/intro.php, Operation Aborted"
    IE8 - I dont receive an error message when on the home page, but when i navigat to another page i see the Yellow triangle at the bottom left of my browser page, and my page content does not appear. When i click on the yellow box to see the error it says the following:-

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.5.30729; .NET CLR 3.0.30618)
    Timestamp: Sat, 22 Aug 2009 01:06:43 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://www.meyselections.com/intro.php
    Now i have two types of JavaScript files, i have Lightbox and a js file for the Drop Down menu. My <head> element on my pages looks like this:-

    <head>
    <link rel="Fav Icon" href="images/fav.ico"/>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title></title>

    <link rel="stylesheet" type="text/css" href="default.css" />

    <script type="text/javascript" src="js/prototype.js"></script>
    <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
    <script type="text/javascript" src="js/lightbox.js"></script>

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

    <!--[if IE 7]>
    <link rel="stylesheet" type="text/css" href="default_IE7.css" />
    <![endif]-->

    </head>
    Am i doing something wrong anywhere?

  5. #5
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think your script is trying to remove an element that is an ancestor of the script itself during parsing, something like
    HTML Code:
    <body>
     <div id=foo>
      <script>
       var foo = document.getElementById('foo');
       foo.parentNode.removeChild(foo);
      </script>
      test
     </div>
    </body>
    Now IE doesn't know what to do in this situation, because the text "test" is supposed to be inserted to the foo div, but the foo div has been removed from the DOM (and possibly garbage collected, so trying to insert into it would cause the program to crash). So it fails with an error.

    I think the IE team have been working on this lately so it might work correctly in IE9.

    As an aside, in Opera the text "test" would be inserted into the body instead of into the removed foo div, which is also incorrect (according to HTML5).
    Simon Pieters

  6. #6
    SitePoint Wizard billy_111's Avatar
    Join Date
    Jul 2009
    Posts
    1,683
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey,

    Well can you check to see if my pages are actually doing this? If you view this page:-

    http://www.meyselections.com/test.html

    You can view the source and see all my HTML, is there a way i can overcome the error i am getting as its not something i can just ignore..

    Regards

  7. #7
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I couldn't find anything relevant from a quick look, although what I described will generate the error message you quoted, IIRC. I don't have IE around right now so I can't test, but maybe you can install a JS debugger for IE to track down what's causing it.
    Simon Pieters

  8. #8
    SitePoint Addict
    Join Date
    Jul 2007
    Location
    San Jose, California
    Posts
    355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    also try running your js through lint...www.jslint.com It won't fix any logical bugs which is what this sounds like, but it can clear up quite a few points were IE can be picky.

  9. #9
    SitePoint Wizard billy_111's Avatar
    Join Date
    Jul 2009
    Posts
    1,683
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey,

    Thanks guys, i found what the problem was..

    It was the lightbox that i was using. So instead of messing around with it i simply took it out.

    Regards


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
  •