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

Re: Decrement does not validate in a page with JavaScript

From: David Dorward <david@dorward.me.uk>
Date: Fri, 1 Oct 2004 11:46:42 +0100
To: "Whittaker, Ray" <ray.whittaker@eds.com>
Cc: www-validator@w3.org
Message-ID: <20041001104642.GA27174@us-lot.org>

On Fri, Oct 01, 2004 at 04:56:25AM -0400, Whittaker, Ray wrote:
> The validator does not have a  problem when I increment the counter as in
> 'currentSlide++;' but throws an error when the counter is decremented
> (currentSlide--;).

You haven't provided a code sample, or stated which markup language
you are trying to validate against, so I will GUESS that you are
wrapping your JavaScript is SGML comment markers (which is really
rather pointless these days, and positively harmful if you are using
XHTML). "--" indicates the end of a comment so you would have:

<!--

  some javascript inside a comment

currentSlide--

  some javascript outside a comment but inside the SGML command thingy[1]

--

  The rest of the doucment inside a comment

[1] Yes, what I know of this level of SGML/XML is sketchy at
best... but that doesn't matter for me becuase I don't use things
which could get caught up in it - external CSS and JS all the way for
me!
  

-- 
David Dorward                                      http://dorward.me.uk
Received on Friday, 1 October 2004 10:46:44 GMT

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