W3C home > Mailing lists > Public > www-validator@w3.org > October 1999

Re: Parsing of JavaScript (Validator FAQ #...1 was it?)

From: Kynn Bartlett <kynn@idyllmtn.com>
Date: Thu, 21 Oct 1999 20:38:05 -0700
Message-Id: <4.2.0.58.19991021203339.00cb49a0@mail.idyllmtn.com>
To: "Roger W. Winget" <wingetr@cs.byuh.edu>
Cc: www-validator@w3.org
Hi, this sounds like actually what's happening is that it's
hitting a </ combination -- such as a javascript statement that
prints out a closing tag, any closing tag -- and then assumes
the rest should be parsed.

What you'll need to check for are statements like:

       document.write("</P>");

In javascript scripts, the "</" stuff must be escaped with a \
(backslash) before the forward slash, so it looks like "<\/"
or else it's invalid.  This is part of the specification for
using javascript with HTML.

For more details, Liam Quinn has a FAQ at:

      http://www.htmlhelp.com/tools/validator/problems.html#script

Hope this helps!  If this doesn't solve your problem, feel free to
provide more information!

--Kynn


At 07:59 PM 10/21/1999 , Roger W. Winget wrote:
>Aloha!
>
>I make heavy use of JavaScript, encapsulating
>the code from older browsers using comments.
>My JavaScript dynamically generates HTML.
>
>My problem is that the Validator ignores my
>comment tags and tries to parse my JavaScript.
>I believe that using JavaScript should disqualify
>me from getting certified.
>
>Mahalo for your time,
>Roger W. Winget
>http://www.cs.byuh.edu/~wingetr/

-- 
Kynn Bartlett  <kynn@idyllmtn.com>                   http://www.kynn.com/
Chief Technologist, Idyll Mountain Internet      http://www.idyllmtn.com/
Catch the Web Accessibility Meme!                   http://aware.hwg.org/
Seeking the Best Internet Dog of 1999!     http://www.virtualdogshow.com/
Received on Thursday, 21 October 1999 23:43:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:13:52 GMT