function ChkFrmSuggt() {
if(document.getElementById('frmSuggt').txtName.value == '') {
alert(' Error..!!! \n Please fill full name. ');
document.getElementById('frmSuggt').txtName.focus();
return false; }
else if(document.getElementById('frmSuggt').txtCompany.value == '') {
alert(' Error..!!! \n Please fill company. ');
document.getElementById('frmSuggt').txtCompany.focus();
return false; }
else if(document.getElementById('frmSuggt').txtTel.value == '') {
alert(' Error..!!! \n Please fill telephone no. ');
document.getElementById('frmSuggt').txtTel.focus();
return false; }
else if(document.getElementById('frmSuggt').txtEmail.value == '') {
alert(' Error..!!! \n Please fill email address. ');
document.getElementById('frmSuggt').txtEmail.focus();
return false; }
else if(document.getElementById('frmSuggt').txtComm.value == '') {
alert(' Error..!!! \n Please fill comment. ');
document.getElementById('frmSuggt').txtComm.focus();
return false; }
else if(document.getElementById('frmSuggt').txtCaptcha.value != document.getElementById('frmSuggt').txtVerify.value) {
alert(' Error..!!! \n Invalid verify code. ');
return false; }
else if(document.getElementById('frmSuggt').txtEmail.value != '') {
var email = document.getElementById('txtEmail');
var filter = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
if (!filter.test(email.value)) {
alert(' Please provide a valid email address. ');
document.getElementById('frmSuggt').txtEmail.focus();
return false; }
}
else
return true;
}
|
Cookies allow us to optimize and personalize your experience. By continuing to use the website, you will be agreeing to our Privacy Policy