title: jQuery-AJAX: the focusout event is fired twice
body: <p>I have a simple HTML form:</p>
  
  <pre><code>&lt;form id="contactForm" method="post" action="./validateForm.php"&gt;
  
      &lt;table&gt;
        &lt;tr&gt;
          &lt;td&gt;Vorname&lt;/td&gt;
          &lt;td&gt;&lt;input type="text" name="firstName" /&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td&gt;Nachname&lt;/td&gt;
          &lt;td&gt;&lt;input type="text" name="surname" /&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td&gt;E-Mail&lt;/td&gt;
          &lt;td&gt;&lt;input type="text" name="eMail" /&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td&gt;Alter&lt;/td&gt;
          &lt;td&gt;&lt;input type="text" name="age" /&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
  
    &lt;/form&gt;
  </code></pre>
  
  <p>I have this jQuery:</p>
  
  <pre><code>$(document).ready(function() {
  
      function validationResult(objData, strStatus, objXMLHttpRequest) {
  
        if('error' === objXMLHttpRequest.responseText)
          alert('error');
        else
          alert('success');
  
      }
  
      $('#contactForm input').focusout(function() {
  
        var strLeftField      = $(this).attr('name');
        var strLeftFieldValue = $('input [name=' + strLeftField + ']').val();
  
        $.ajax({ type: 'POST', url: './validateForm.php', data: strLeftField=strLeftFieldValue, async: true, cache: false, success: validationResult });
  
      });
  
    });
  </code></pre>
  
  <p>I am wondering why the .focusout() event is fireing twice. It must have something to do with the AJAX request, because if I comment it out, it is not fireing twice. But why?</p>
  
  <p>Is the focusout() event even the right event to determine if the user has left an input field in my form?</p>
  
  <p>I am using jquery-2.0.3.min.js if this is relevant.</p>
  
  <p>Thanks in advance for any hints.</p>
  
  <p>Best regards.</p>