7

SOLVED: I was appending to SECTION tag, whereas IE8 doesn't support this tag, parsing it as text/non-closed html tag, infamous cause to halt append! so I added a condition that creates HTML5 elements for IE versions below 9, as portrayed here and the problem went away, it actually fixed a bunch of other bugs as well! http://tatiyants.com/how-to-get-ie8-to-support-html5-tags-and-web-fonts/

Sorry everyone. :(

Testing a new website I built on IE8, using jQuery v1.x (1.11.1). Using HTML5, code is validated.

I have this snippet inside a success function of an ajax function:

$('.product_details_contact_form_wrapper').detach().appendTo('#primary');

For some reason, under Chrome and Firefox it's all dandy, IE11 as well. Problem occurs when I set IE11 to emulate IE8. Then, I get a script pause and IE is complaining over appendChild in the jquery library code:

IE11(8) Inspector directs to b.appendChild(a), marked with yellow and:

"Unexpected call to method or property access." marked with red, beneath it.

enter image description here

18
  • 3
    I see, but how does it help to me to solve this bug? thanks
    – adi518
    Oct 3, 2014 at 15:37
  • 1
    I think the suggestion is that from Avril is that you could switch to innerHTML if you needed to. Oct 3, 2014 at 15:47
  • 2
    Please consider creating a fiddle on jsfiddle.net or a similar side (or a stack snippet inside your answer) that illustrates this issue - there is a lot of code involved we can't see. Oct 3, 2014 at 15:50
  • 2
    Internet explorer 8 does this whenever it encounters invalid markup in the added tags. IE11 as well as other browsers on the other hand attempt to correct the HTML. You're getting this error because you have invalid HTML. Try alerting or console.loging '<div class="product_display" style="width:' + (product_w*2) + 'px; height:' + (product_h*2-nav_h) + 'px; margin-top:' + nav_h + 'px;">' + data + '</div>'; and let us know what HTML you get. Oct 3, 2014 at 15:52
  • 2
    Please remove the "answer" from your question and post it as an answer.
    – Artjom B.
    Nov 16, 2014 at 11:10

1 Answer 1

1

Sorry for the time it took me to update this question. Ok, so the ultimate solution to this problem was adding html5shiv to my project. That's it. Ignore my previous comments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.