i need to validate the form .. fields should not be empty is justified... but the last field i.e var z should be numeric ..please reply fast
Code:
function validateform()
{
var x=document.getElementById("nameid").value;
if(x==''){alert("name should not be empty");return false;}
var y=document.getElementById("qualificationid").value ;
if(y==''){alert("qualification should not be empty");return false;}
var z=document.getElementById("rollnumid").value;
if(z==''){alert("rollnum should not be empty");return false;}
}
Comment