Function to Check if field is blank using javascript

Rajni.Shekhar
Posted by Rajni.Shekhar under JavaScript category on | Points: 40 | Views : 1810
function IsBlank(ObjId, fieldName) {
if (obj) {
var val = document.all(ObjId).value;
if (val == "") {
alert("Please enter value for \"" + fieldName + "\"");
document.all(ObjId).focus();
return true;
}
return false;
}
}

Comments or Responses

Posted by: T.Saravanan on: 3/25/2012 Level:Silver | Status: [Member] [MVP] | Points: 10
Kindly post your code inside the code tag.

Login to post response