Validator treats javascript as if it were HTML when <!-- //--> is missing.

The first error I get in my page is this:

1. Warning Line 34 column 17: character "<" is the first character of a 
delimiter but occurred as data.

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

I fixed the problem by using the <!--  //--> javascript fix but shouldn't 
the parser give me a more sensible error message?

Here is my page prior to the body tag (after I fixed it by including <!--  
//--> ):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
<html xmlns="" lang="en" xml:lang="en">
<title>Mandatewire News</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="images/news2.css" type="text/css" rel="stylesheet" />
<script type="text/JavaScript" src='../javascript/browser.js'></script>
<script type="text/JavaScript" src='../javascript/minmax.js'></script>
<script type="text/JavaScript" src='../javascript/mandatexml.js'></script>
<script type="text/JavaScript" src='../javascript/news.js'></script>
<script type="text/JavaScript">
function MenuButtonIn(oMenuButton){ = 'url(images/MenuSlice2.gif)';
function MenuButtonOut(oMenuButton){ = 'url(images/MenuSlice1.gif)';
function init(){
  showMandate(4707, true);
// Ticker Tape
// regenerate2();
// update()
function FixMenu()
  var aMenu = 
  for(var i=0; i<aMenu.length; i++)
window.onload = init;

Received on Monday, 2 April 2007 19:29:16 UTC