title: Jquery form.submit not working
body: <p>I have the Code like this which checks code availability if code exists the form does not submit</p>
  
  <p>i have the code which is not working</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      $('#Loading').hide();
              var min_chars = 3;  
              //result texts  
              var characters_error = 'Minimum amount of chars is 3';  
              var checking_html = 'Checking...';      
  
  
          $('#reality_form').submit(function(){
  
              if($('#realitycode').val().length &lt; min_chars){
                  $('#Info').html(characters_error);  
              }else{  
                  //else show the cheking_text and run the function to check  
                      $('#Info').html(checking_html);  
                          var reltcode = $('#realitycode').val();  
  
                  //use ajax to run the check  
                  $.post("http://localhost/Testtt/wp-content/plugins/Realestate Redirection/check_realitycode_availablity.php", { realitycode: reltcode },
  
                   function(result){  
                      //if the result is 1  
                      if(result == 1){  
                          //show that the username is available
                          alert('hi');  
                          $('#Info').html(reltcode + ' is Available'); 
  
                      }else{  
                          alert('hello'); 
                          $('#Info').html(reltcode + ' is not Available');
  
                      } 
  
                  }); 
             return false;    
              }
  
      });  
  
   }); 
  
  &lt;/script&gt;
  &lt;div class="wrap"&gt; 
              &lt;?php    echo "&lt;h2&gt;" . __( 'RealEstate Listing Options', 'oscimp_trdom' ) . "&lt;/h2&gt;"; ?&gt;
              &lt;form action="" name="reality" method="post" id="reality_form"&gt;
              &lt;input type="hidden" name="reality_hidden" value="Y"&gt;  
              Website Url:&lt;input type="text" name="website_url" value="" /&gt;
              Listing Code: &lt;input type="text" name="rlt_code" id="realitycode" /&gt;
              &lt;input type="submit" name="submit" value="submit" /&gt;
              &lt;div id="Info"&gt;&lt;/div&gt;
              &lt;span id="Loading"&gt;&lt;img src="http://localhost/Testtt/wp-content/plugins/Realestate Redirection/loader.gif" alt="" /&gt;&lt;/span&gt;
  
              &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>As i look on console the Ajax url becomes error but when i use for <code>realitycode keyup()</code> function then Ajax works properly. i want form should not get submit if any error. but form is submitting in every case
  Please help</p>