javascript validation problems

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 UTC