How can I deal with the following error I get when I use Dean Edwards' IE7.js with IE6?

313 views Asked by At

I'm using Dean Edwards' IE7.js for IE6

<!--[if lt IE 7]>
<script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js" 
        type="text/javascript"></script>
<![endif]-->

and getting a JavaScript error on IE 6 when it reads the line:

c.runtimeStyle[h]=c.parentElement.currentStyle[h]

How can I solve this?

1

There are 1 answers

2
cwallenpoole On

I don't believe IE6 has a parentElement property. You might be able to get around this by including this code in the <!--[if lt ie7]> tag:

Element.prototype.parentElement = Element.prototype.parentNode;