I am making simple html form and doing validation using javascript.. But my form did not stop on error...
if(document.register.fname.value=="")
{
alert("plz enter username");
document.register.fname.focus();
alert("plz enter username");
return false;
}
Html Part is....
<input type="image" src="img/signup.PNG" alt="Sign Up" value="signup" onsubmit="return regis()" />
Even if I left the blank it goes on another page.... plz help me that what is the error??