Re: [VE][53] Error Message Feedback

On 21-Oct-04, at 11:43 AM, Vincent Hallberg wrote:

> I’m working on page with over 1500 lines of code in it and have about 
> 1000 lines of that devoted to JavaScript. 
>
> The JavaScipt portion starts off like this on line 166:
>
> <script charset="iso-8859-1" type="text/javascript">
>
> <!-- //
>
>  
>
> And ends like this on line 1241:
>
> // -->
>
> </script>
>
>  
> Along the way I have a number of lines of code that look like this:
>
> for (a = opts.length; a > 0; --a) {
You've ended your comment with that --
<http://www.w3.org/TR/html401/intro/sgmltut.html#h-3.2.4>

> Obviously there is a problem in the HTML Validator when parsing very 
> long pages of code like this, specifically dealing with the double 
> hyphens -- which you eventually see at the bottom of your JavaScript 
> code.
What you've described happening is the correct behaviour.

> Do you guys have a work around or even know about this problem?
The easiest solution for fixing your code is to move the javascript 
into an external file. This also tends to make maintenance easier and 
reduce the size of your pages if the script is common to multiple 
pages.

Received on Friday, 22 October 2004 01:25:12 UTC