Forum Moderators: open
So I'm trying to find an object that was added or removed in IE8 so I can reliably apply a JavaScript fix for this. That fix is simply to get the parent element's background-color and apply it.
- John
I'm going to use case sensitivity...
if (document.getElementById('Body')) {alert('IE7');} else {alert('IE8');}
...though I will also use object detection for IE7 versus IE8 (such as responseXML in example).
I can use case sensitivity as I practice numerous good coding practices (such as using all lower case code with the only exceptions when JavaScript uses capitol letters in a letter for objects/methods/etc).
- John
You could probably use conditional comments.
<!--[if IE 7]><script>var ie7 = true;</script><![endif]-->
[edited by: Fotiman at 1:17 pm (utc) on April 11, 2009]