[jboss-user] [JBoss Portal] - Re: How do I output a HTML comment in the head-tag via heade

wa7son do-not-reply at jboss.com
Tue Oct 10 09:22:17 EDT 2006


"thomas.heute at jboss.com" wrote : Not sure what you aretrying to do but did you try  surrounding it with CDATA ?

Yes... In that case it is not injected to the head tag at all.

I tried two ways, both of which did not work:

  | <![CDATA[<!--[if lt IE 7.]>]]>
  | <script src="/javascripts/pngfix.js" type="text/javascript" defer="defer">// foobar</script>
  | <![CDATA[<![endif]-->]]>
  | 
and as you suggested:

  | <![CDATA[
  | <!--[if lt IE 7.]>
  | <script src="/javascripts/pngfix.js" type="text/javascript" defer="defer">// foobar</script>
  | <![endif]-->
  | ]]>
  | 

What I am trying to achive is to insert what is called "conditional comments", but the problem is basically to insert any HTML comment at all. 

For more info on conditional comments see:
http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp
http://virtuelvis.com/archives/2004/02/css-ie-only

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977231#3977231

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977231



More information about the jboss-user mailing list