Hi Brett,

I just tried adding that CDATA code again and this time it worked, I am not sure why it did not work when I tried before, Thank you a lot, works like a charm and passes the W3 validation :)

_
Kind regards
Jesper


Brett Bieber wrote:
On 1/17/07, Jesper <struktor@gmail.com> wrote:

Hi David,

Thank you for the fast reply, I was aware of the  <![CDATA[/*> code as
it is mentioned on W3's page here http://www.w3.org/TR/xhtml1/#h-4.8 but
this doesn't work, when I add it then the code is hidden from the page,
and hence useless :)

You've understood the concept, but you aren't putting it together
within the context of a javascript.  You need to use javascript
comments to prevent a javascript parse error, because the CDATA
declarations are not valid javascript/ecmascript.

<script type="text/javascript">
   //<![CDATA[

   // place your javascript/ecmascript here.

   //]]>
</script>