title: AJAX call returns results, but in a blank page
body: <p>There are a couple of questions that are somewhat similar to this, but I haven't been able to get their solutions to work for me.</p>
  
  <p>Basically, I am making an AJAX call that is working properly--the result is coming back through. The issue is that instead of processing the result, the result-array is printed back to the screen (and deletes everything else). Clearly, it is not handling the incoming result properly, but I'm not sure why.</p>
  
  <p>This is the form being sent:</p>
  
  <pre><code>&lt;form class="removeAndApply" method="post" action=""&gt;
      …hidden inputs...
      &lt;button type="submit"&gt;Use&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The PHP that is processing the AJAX:</p>
  
  <pre><code>case "removeAndApply_PromoCode":
      …Get data from $_POST….
      …process stuff...
      $response = …..;
      $finalPrice = ….;
  
      $dataArray = array('response'=&gt;$response, 'finalPrice'=&gt;$finalPrice);
      header('Content-type: application/json');
      echo json_encode( $dataArray );
      exit();
      break;
  </code></pre>
  
  <p>Here is a sample result text, as printed on my screen during failure:
  <code>{"response":{"Col1":"13","0":"13","Col2":"PC2","1":"PC2","Col3":"1","2":"1","Col4":"45.89","3":"45.89","col5":null,"4":null,"Col6":"1","5":"1"},"finalPrice":0}</code></p>
  
  <p>And this is the javascript function that is supposed to handle it:</p>
  
  <pre><code>$('.removeAndApply').ajaxForm({url: this.href, type:'post',
      data: this.serialize,
      dataType: 'json',
      success: function(response){
          alert("asdf");
      } 
   });
  </code></pre>
  
  <p>Thanks.</p>