esthera
07-05-2007, 08:30 AM
i'm using
function checkemail(email){
var str=email
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str)){
testresults=true
}else{
//alert("Please input a valid email address!")
testresults=false
}
return testresults
}
and then checking -
if (checkemail(form.C_EmailAddress.value)==false){
errorMsg += "Email Address is not valid\r\n";
error=1;
}
is there something wrong that i'm missing above???
i'm getting an error in a function below.
please advise.
function checkemail(email){
var str=email
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str)){
testresults=true
}else{
//alert("Please input a valid email address!")
testresults=false
}
return testresults
}
and then checking -
if (checkemail(form.C_EmailAddress.value)==false){
errorMsg += "Email Address is not valid\r\n";
error=1;
}
is there something wrong that i'm missing above???
i'm getting an error in a function below.
please advise.