views:

26

answers:

1

It seems like a silly question, but I'm stumped.

I'm using an if IE conditional statement to fix some issues in IE6.

In the head, I have

<!--[if lt IE 7] > <script type="text/javascript" src="js/ie6.js"></script> < ![endif]-->

And in the ie6.js file, I have a simple alert, which works when I take it out of the conditional comment. But in IE, the alert does not show. I am testing on IE 6.0.2900 on Windows XP in Parallels Desktop.

+5  A: 

Try it without spaces in the tags:

<!--[if lt IE 7]>
According to the conditional comment this is Internet Explorer lower than 7
<![endif]-->
Sjoerd
That should not matter as I have conditionals in similar fashion to how he has it and they work correctly for me.Edit: sorry i misread your answer, I thought you meant the new line for the conditional code not the spacing on "]>" and "<!".
Chris
Brilliant - that works. It was the spacing between "]" and ">" and the similar spacing on the closing tag.
Mike Eng