0

Invalid property value javascript error in IE6 and IE7

Posted April 16th, 2011 in Razno and tagged , , , by Metod

Recently I checked to see if my new project worked in IE6 and IE7. Well, actually I checked how it behaved. Obviously it did not work as expected.

The IE’s kept on bugging me with JS errors. IE6 said “Invalid property value”, while IE7 said “Unknown runtime error”. The code snippet was the following:

  1. el.style.color = "inherit";

And it worked in all browsers except in IE6 and IE7. As I learned later on, IE < 8 does not support the inherit value. So when changing the inherit to an actual color value, the errors were gone. So the next time you are bugged by this kind of errors in IE < 8, check for inherit values in your CSS, JS.