title: jQuery AJAX Success
body: <p>I'm using jQuery's <code>$.ajax</code> function to submit a form, which works, but the success is where I'm having my problem. Here is my code:</p>
  
  <pre><code>$("#form").submit(function () {
          $.ajax({
              type: "POST",
              url: '/login/spam',
              data: formData,
              success: function (dataCheck) {
                  if (dataCheck == 'value') {
                       //Do stuff
                  }
              }
          });
          return false;
      });
  </code></pre>
  
  <p>The problem I'm having is the <code>if</code> function keeps saying that dataCheck doesn't equal <em>value</em>. I know that it does, because when I remove <code>return false;</code> the page displays <em>value</em>, as expected. Also, I have used an almost identical code before, which works. Could somebody give me some advice?</p>