views:

172

answers:

1

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?

A: 

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;
Christopher W. Allen-Poole
but for IE7 i don't need this javascript. I use this only for IE6.
metal-gear-solid
Actually `parentElement` is IE-only.
Crescent Fresh