Re: xhtml+javascript. bug?

Because I have some document.write statements that I'm not sure will work as
external scripts.

But another question. The reference you cited earlier also says you may need
to use the CDATA statement for <style> definitions. When would this be the
case? Only if you've got < or & in your style code? I can't think of when
that could ever happen.

What am I missing, and is it OK to not put the CDATA statement around normal
style sheets?


----- Original Message -----
From: "Liam Quinn" <liam@htmlhelp.com>
To: "Peter K. Sheerin" <pete@petesguide.com>
Cc: <www-validator@w3.org>
Sent: Monday, June 11, 2001 4:55 PM
Subject: Re: xhtml+javascript. bug?


> On Mon, 11 Jun 2001, Peter K. Sheerin wrote:
>
> > I had the same problem, but solved it using the combination of HTML and
> > Javascript comment tags, as in:
> >
> > <!--
> > js code
> > //-->
> >
> > Can you explain the difference between why each one of these methods
works,
> > and if there are any problems with the one I used?
>
> An XHTML browser will ignore your JavaScript because it's commented out.
>
> > Do I *really* need to use the CDATA marking?
>
> Why not use external JavaScript files?
>
> --
> Liam Quinn
>
>

Received on Tuesday, 12 June 2001 15:55:45 UTC