W3C home > Mailing lists > Public > www-validator@w3.org > November 2010

Javascript: character ";" not allowed in attribute specification list

From: Peter Bonjernoor <peter@zaph.nl>
Date: Wed, 24 Nov 2010 21:48:15 +0100
To: <www-validator@w3.org>
Message-ID: <005101cb8c18$eaca2090$c05e61b0$@zaph.nl>
The page this concerns is http://sec.zaph.nl/

Since it may well change in the near future (this is the development version) I have included the source that gives the errors, and the errors themselves below. The errors and warnings below are the only ones being found at the moment. I tried encapsulating the actual javascript with <!-- and -->, but that didn't change anything.

Code:

<script type='text/javascript'>
        var a = document.getElementsByTagName('A');
        var b;
        for (var i=0; i<a.length; i++) { // <-- This is line 104
               if (!a[i].onclick) {
....etcetera

 

 

·  Description: ErrorLine 104, Column 26: character ";" not allowed in attribute specification list 

        for (var i=0; i<a.length; i++) {

 <http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fsec.zaph.nl%2F;errmsg_id=81#errormsg> ✉ 

·  Description: ErrorLine 104, Column 26: element "a.length" undefined 

        for (var i=0; i<a.length; i++) {

 <http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fsec.zaph.nl%2F;errmsg_id=76#errormsg> ✉ 

You have used the element named above in your document, but the document type you are using does not define an element of that name. This error is often caused by: 

*	incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "<frameset>" element),
*	by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
*	by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).

·  Description: ErrorLine 128, Column 9: end tag for "a.length" omitted, but OMITTAG NO was specified 

</script>

 <http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fsec.zaph.nl%2F;errmsg_id=70#errormsg> ✉ 

You may have neglected to close an element, 

·  Description: InfoLine 104, Column 17: start tag was here 

        for (var i=0; i<a.length; i++) {

 







image001.png
(image/png attachment: image001.png)

image002.png
(image/png attachment: image002.png)

Received on Wednesday, 24 November 2010 22:28:24 GMT

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