This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The validator detected that a javascript function was writing invalid HTML code to a SPAN. I commented that code out so I could refer back to it if need be, then wrote the correct code. Even though the old code was commented out, though, the validator was still registering it as erronous code. I had to completely delete the code instead.
Validator does not execute or interpret javascript at all, it doesn't know what the (client side) script writes or knows anything about javascript comments, it just checks the HTML validity. Without a URL to look at, I guess what you're seeing is quite likely covered by the validator's FAQ entry on javascript: http://validator.w3.org/docs/help.html#faq-javascript