title: Form not submitted by $(form).submit() subsequently
body: <p>I'm doing a server-side form validation. On [submit] button clicked my code adds field <strong>_validate</strong> to the form and sends the form to the server in AJAX mode. On success form should be submitted, but it not happened.</p>
  <pre><code>$(document).ready(function(){
  
      $('form[action*=&quot;#validate&quot;]').on('submit', function(e){
          var $form = $(this);
          var $submit = $form.find('input[type=submit]');
          var $validate = $form.find('input[name=_validate]');
          if ($validate.length&gt;0 &amp;&amp; $validate.val()=='success') // already validated
          {
              //e.returnValue = true; it's deprecated
              console.log('validated'); // #2
              return true; // supposed form submit
          }
          e.preventDefault();
  
          if ($validate.length==0)
              $form.append('&lt;input type=&quot;hidden&quot; name=&quot;_validate&quot; value=&quot;asking&quot; /&gt;');    
              $validate = $form.find('input[name=_validate]');
              var params = $form.serialize();
              $.ajax({
                  url: $form.attr('action'),
                  method: $form.attr('method').toLowerCase(),
                  data: params
              })
                  .then(function(response, statusText, xhrObj){
                      var json = JSON.parse(response);
                      if (json._status!='ok')
                      {
                          // writing messages
                      }
                      else
                      {
                          $validate.val('success');
                          $form.attr('action', $form.attr('action').replace('#validate', ''));
                          $form.submit(); // #1
                      }
                  }); 
  
      });
      
  
  });
  </code></pre>
  <p>form.submit() marked with <strong>#1</strong> makes subsequest onsubmit call, the script prints <strong>validated</strong> (<strong>#2</strong>) but form woudn't submit - no queries in Net console, no error or warning messages.</p>