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

javascript validation problems

From: Jason Millward <jmillward@oneadvertising.co.uk>
Date: Tue, 16 Jan 2007 16:04:03 -0000
Message-ID: <0210AFA5EE779147B7D9786A7F4E4F0823FC62@oneserver.one.local>
To: <www-validator-css@w3.org>
Hi 

 

I am having problems validating my css because of some javascript in the header of my page. The website is http://www.atlas-washrooms.co.uk <http://www.atlas-washrooms.co.uk/>  

 

I have used the xhtml validator and the xhtml is valid apart from a few warnings generated by the javascript as follows :

 

Below is a list of the warning message(s) produced when validating your document. 

1.	Warning Line 15 column 18: character "&" is the first character of a delimiter but occurred as data.

  if (document.all && document.getElementById) {

This message may appear in several cases: 

	*	You tried to include the "<" character in your page: you should escape it as "&lt;"
	*	You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
	*	Another possibility is that you forgot to close quotes in a previous tag.

✉ <http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.atlas-washrooms.co.uk%2F;errmsg_id=404#errormsg>  

2.	Warning Line 15 column 19: character "&" is the first character of a delimiter but occurred as data.

  if (document.all && document.getElementById) {

✉ <http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.atlas-washrooms.co.uk%2F;errmsg_id=404#errormsg>  

3.	Warning Line 17 column 14: character "<" is the first character of a delimiter but occurred as data.

         for (i=0; i < navRoot.childNodes.length; i++) {

 

 

but when I used the css validator I get the following error:

 

Please, validate your XML document first!

Line 15

Column 20

The entity name must immediately follow the '&' in the entity reference. 

Is there anything I can do to bypass this or is it possible to change the javascript so it is valid?

Many thanks

Jason

 

t

 

Received on Tuesday, 16 January 2007 18:26:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:18 GMT