title: javascript S.get to check already exist data
body: <p>The following function i used to check the value is present in my table or not.all other database related process is ok but here in given function it give me the alert of existing value than also it submit the form.but i want like when it matches same value in table .the form cant be submited.i cant find the problem in my given code please held i also tried out using post also but not working.thanks</p>
  
  <pre><code>    function validateEditBranch()
      {
          var branch_city = document.forms['e_branch_form']['e_branch_city'].value;
          branch_city=branch_city.trim();
          if(branch_city == "" ){ 
              alert("Please, Enter Branch City");
              document.forms['e_branch_form']['e_branch_city'].value='';
              return false;
  
          }else
          {
              $.get("?action=database_manage&amp;ex_e_branch="+branch_city,function(data){
                  if(data)
                  {
                      alert("already exist");
                      return false;
                  }else{return true;}
              });
          }
  
      }
  </code></pre>