function trainNoName(txt) { var trainNo=txt.value; if(trainNo=="") { alert(txt.name+" Field Can't be empty"); document.getElementById("stFrm").focus(); } }
function trainNoName(txt) { var txtTN=document.getElementById(txt); var trainNo=txtTN.value; if(trainNo==''){ alert('Train No Field Cannot be empty'); document.getElementById(txtTN).focus(); } }
txt
txt.value
txt.name
function trainNoName(txt) { var trainNo=txt.value; if(trainNo=="") { alert(txt.name+" Field Can't be empty"); txt.focus(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)