function validation()
{
try{
var name=document.form1.name.value
if(!name)
{
alert("Enter your name");
document.form1.name.focus();
return false;
}
var email=document.form1.email.value;
if(!email)
{
alert("Enter your Email-Id ");
document.form1.email.focus();
return false;
}
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(email))
{}
else{
alert("Invalid Email Address! Please Re-Enter.")
document.form1.email.focus();
return false
}
var comments=document.form1.comments.value;
if(!comments)
{
alert("Enter your Comments");
document.form1.comments.focus();
return false;
}
var spamcode=document.form1.spamcode.value;
if(!spamcode)
{
alert("Enter image verification code");
document.form1.spamcode.focus();
return false;
}
}catch(er)
{
alert(er);
}
}
|
|
|
|
|
Copyright © 2008 BrightPoint Solutions OÜ. All Rights Reserved |
|
|
|