A
Alec S.
Hi,
Whenever I see conditional comments used, they are used for CSS-to include a
CSS file for IE.
I am trying to use them for something else. I have a page that has a DIV
which when viewed in IE should support dragging and right-clicks but I also
want it to validate. Is there an ELSE/ELSEIF tag I can use like this:
<!--[if IE]>
<div onclick="func1();" ondrag="func2();" oncontextmenu="func3();">
<![elseif]> (or <![else]>)
<div onclick="func1();">
<![endif]-->
I also tried:
<div onclick="func1();" <!--[if IE]> ondrag="func2();"
oncontextmenu="func3();" <![endif]--> >
Speaking of which can you use them inside tags to comment out attributes
like:
<img src="blah" <!--[if IE]> src="blah2" <![endif]--> />
or use different ones like:
<img src="blah" <!--[if IE]> height="10" <![endif]--> />
Neither one works properly. Is there a way to fix it or another way I can
do this?
thanks.
Whenever I see conditional comments used, they are used for CSS-to include a
CSS file for IE.
I am trying to use them for something else. I have a page that has a DIV
which when viewed in IE should support dragging and right-clicks but I also
want it to validate. Is there an ELSE/ELSEIF tag I can use like this:
<!--[if IE]>
<div onclick="func1();" ondrag="func2();" oncontextmenu="func3();">
<![elseif]> (or <![else]>)
<div onclick="func1();">
<![endif]-->
I also tried:
<div onclick="func1();" <!--[if IE]> ondrag="func2();"
oncontextmenu="func3();" <![endif]--> >
Speaking of which can you use them inside tags to comment out attributes
like:
<img src="blah" <!--[if IE]> src="blah2" <![endif]--> />
or use different ones like:
<img src="blah" <!--[if IE]> height="10" <![endif]--> />
Neither one works properly. Is there a way to fix it or another way I can
do this?
thanks.