FW: javascrip < failing the validator

The following html fails, I have removed as much of the original as possible
to still produce the error.

The following errors were reported

..  WarningLine 10, Column 18: character "<" is the first character of a
delimiter but occurred as data 

                       for(i = 0 ; i < number; i++){ 

This message may appear in several cases: 

*	You tried to include the "<" character in your page: you should
escape it as "&lt;"
*	You used an unescaped ampersand "&": this may be valid in some
contexts, but it is recommended to use "&amp;", which is always safe.
*	Another possibility is that you forgot to close quotes in a previous
tag.

..  ErrorLine 10, Column 18: StartTag: invalid element name 

                       for(i = 0 ; i < number; i++){ 

line one

NOTE: Whenever possible, give the address of the document you were checking.


BELOW IS THE CODE That fails:

Any help would be appreciated.

rrinlv@cox.net

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

  <head>

    <title>this is a test page</title>

            <meta http-equiv="Content-Language" content="en-us" />

            <meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" />

             <script type="text/javascript" >

                function HideEmpty(){

                                    var number =
document.getElementById('EmptyItemsCount').value;

                                    for(i = 0 ; i < number; i++){ 

                                                DivToShow='EmptyItems'+ i;

 
document.getElementById(DivToShow).style.display='inline';

                                    }          

                        }

             </script>

</head>

<body>

<div id="EmptyItems0">

                        <input  type="text" name="FromOrder" value="1042"/>

</div>             

                         <input type="hidden" name="EmptyItems"
id="EmptyItemsCount" value="1"/>

</body>

</html>

Received on Monday, 8 October 2012 08:17:20 UTC