Hi all, I just code below a simple email validation by using JavaScript. Let us see what's there, {codecitation class="brush: javascript; gutter: true;" width="500px"} function MailValidation(mailfield) { with (mailfield) { atValue=value.indexOf("@"); dotValue=value.lastIndexOf("."); if (atValue<1||dotValue-atValue<2) { alert('Not a valid e-mail address!'); return false; } else { return true; } } }
function FormValidation(thisform) { with (thisform) { if (MailValidation(email)==false) { email.focus(); return false; } } }
{/codecitation}
...S.VinothkumaR. http://vinothnat.blogspot.com |