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;}
}

Last edited by shabbir; 16Aug2012 at 11:55.. Reason: Code blocks