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

[VE][79] New Error Message Suggestion

From: John Blackbourn <john@wormfeeder.com>
Date: Sun, 30 May 2004 12:05:36 +0100
Message-ID: <001701c44636$09967490$b0014d51@silverbox>
To: <www-validator@w3.org>
Hi,

When validating my web page, which contains some JavaScript,
the following error is generated:

end tag for element "A" which is not open
...r((fs),((di.length)-6-fs)) + '</a></td></tr>');

However, this "end tag" is contained within JavaScript, as you
can see from the snippet above. The tag is there because it is
written into the page via the JavaScript "document.write" function.
This is a snippet of the code a few lines above:

document.write('<a href="' +  ...  + '">');

The   <a>   tag is both opened and closed within the JavaScript, but
due to the URL being generated from a complex algorithm, and then
pieced together in the "document.write" function, it is not being
detected by the W3C Validator.
I suspect this is because the closing   >   is separated from the
initial   <a   by an amount of JavaScript and at least one line break.
I have found no way to work around this.

I'd be very grateful if either a suggestion could be made by yourselves,
or even an amendment made to the Validation engine, if of course the
code does comply to the W3C standards, which I must admit I'm
only just starting to implement to any degree.

Thanks in advance, and regards, John Blackbourn.

[ My personal weblog: www.johnblackbourn.com ]
Received on Sunday, 30 May 2004 07:09:00 GMT

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