Thursday, 19 September 2013

IE8 appendChild "Unexpected call to method or property access"

IE8 appendChild "Unexpected call to method or property access"

I really need some help with this issue I'm having. Only seem to have on
IE8. IE7 works fine which is weird. I'm using IE9 (F2) development tool
IE8 emulator which seem to work good. I also checked on VMware native IE8
and getting the same results. Anyway is that a issue with appendChild in
IE8? How can I solve this issue and is there a jquery or better way of
coding this section.
IE report this as the issue **
s.appendChild(document.createTextNode(jcode)); ** "Unexpeced call to
method or property access"
for (var i=0; i<showContain.length+1; i++)
{
var s = document.createElement('script');
s.setAttribute('type','text/javascript');
var jcode = "$('#showdiv" + i +
"').mouseover(function(){$('.showcaseoff').hide(); $('#showcase" + i +
"').show()});";
s.appendChild(document.createTextNode(jcode));
document.body.appendChild(s);
}
Thanks...

No comments:

Post a Comment