VALIDATION JS AND AJAX FORMAT
<br /> <script type="text/javascript"> <br />function validate() <br />{ <br /> <br />var gender=document.regform.gender.value; <br />if(gender=="0" || gender=="") <br />{ <br />alert("Select the field Gender.");document.regform.gender.focus();return false; <br />} <br /> <br />var name=document.regform.name.value; <br />if(name=="0" || name=="" ) <br />{ <br />alert("The Name field is blank."); <br /> <br />document.regform.name.focus();return false; <br />} <br /> <br />re = /^[A-Za-z ]+$/; <br />if(re.test(document.regform.name.value)) <br />{ <br />//alert('Valid Name.'); <br />} <br />else <br />{ <br />alert('Invalid Name ! Only Alphabets are allowed.');document.regform.name.focus();return false; <br />} <br />