I cant run my code
<p>hi I have this code and i cant get it to work im new with ajax jquery and javascript so pls be nice :) and thank you for the help :)
this code should be a simple form validation but when i tab in to the next input box it does nothing. it should be displaying an error msg that the uname is less than 5 characters long. thank you!</p>

<pre><code>&lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
function validateUsername(){
    var uname=document.getElementById("uname").value;
    if(uname&lt;5){
        document.getElementById("errormsg").value = "wait";
    }

}
&lt;/script&gt;

&lt;body&gt;
&lt;form method=post id=regform action=jscript.html&gt;
&lt;table&gt;
    &lt;tr&gt;    
        &lt;td&gt;Username&lt;/td&gt;
        &lt;td&gt;&lt;input type=text name=uname id=uname onBlur="javascript:validateUsername()"/&gt;&lt;/td&gt;
        &lt;td&gt;&lt;input type=hidden name=errormsg value='' id=errormsg"/&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;    
        &lt;td&gt;Password&lt;/td&gt;
        &lt;td&gt;&lt;input type=text name=uname id=uname onBlur="javascript:validatePassword()"/&gt;&lt;/td&gt;
        &lt;td&gt;&lt;input type=hidden name=errormsg value='' id=errormsg"/&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
&lt;/form&gt;
</code></pre>

<p></p>
