W3C home > Mailing lists > Public > www-validator@w3.org > January 2007

Re: [VE][64] Validator parses <.....> inside <script></script> need advise

From: Brett Bieber <brett.bieber@gmail.com>
Date: Wed, 17 Jan 2007 20:12:20 -0600
Message-ID: <efa010fb0701171812q7cb3ad82m4f226df91937a96e@mail.gmail.com>
To: Jesper <struktor@gmail.com>
Cc: www-validator@w3.org

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">

    // place your javascript/ecmascript here.


-Brett Bieber

http:saltybeagle.com aim:ianswerq
Received on Thursday, 18 January 2007 02:12:26 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:50 UTC