I have a Jquery Validation code in which I have written
element.focus();
When I view that page into other browser I able to modify that previous Field if I was left next field blank or wrong input.
but in chrome i wont able to do so..!
Can you please explain the reason behind this?
Thanks in Advanced…!
The Full Code of function is here..
function validateFullName(){
var s=fullName.val();
var i;
var returnString = "";
var c = s.charAt(i);
var b = s.match(/^a-zA-Z '+$/);
if(fullName.val().length == ''){
fullName.addClass("error");
fullNameInfo.text("Please enter Name.");
fullNameInfo.addClass("error5");
fullName.focus();
return false;
}
if (c == " "){
fullName.addClass("error");
fullNameInfo.text("Name Should Not Start With Space.");
fullNameInfo.addClass("error5");
fullName.focus();
return false;
}
if (!b){
fullName.addClass("error");
fullNameInfo.text("Symbols and Numbers Not Allowed in Name.");
fullNameInfo.addClass("error5");
fullName.focus();
return false;
}
else{
fullName.removeClass("error");
fullNameInfo.text("");
fullNameInfo.removeClass("error5");
return true;
}
}