That's actually an error on the part of the validator - at least as far as I can tell. It's not recognizing that as a full comment. There might be some technical reason why it doesn't, and the standards writing folks at W3C might defend it on that basis.
In any case, you can fix it like so:
Code:
<script type="text/javascript" src="/anylink/anylinkmenu.js">
/***********************************************
* AnyLink JS Drop Down Menu v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
//* Visit Project Page at http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm for full source code
***********************************************/
</script>
I often do:
Code:
<script type="text/javascript" src="/anylink/anylinkmenu.js">
/***********************************************
//* AnyLink JS Drop Down Menu v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
//* This notice MUST stay intact for legal use
//* Visit Project Page at http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm for full source code
***********************************************/
</script>
just to make it even, but it's just that one line, the one with the full URL in it, that causes the error. I think the validator thinks we are trying to close the multi-line comment or open a new one but doing it incorrectly. I'm not sure why turning it into a single line comment works to fix that, but it does. Maybe it closes the multi-line comment before the offending part that now is seen as a single line comment. But that doesn't seem right/logical given the resulting syntax. In fact, as I say, since the whole thing is a comment, nothing in there should matter in the way that this does to the validator. But it does 'fix' it.
I've tried other approaches, this is the only one that works. That is unless you move the comment outside the script block and make it into an HTML comment. That also works. I think this solution looks better though.
Bookmarks