title: Ajax post getting "cancelled"
body: <p>I have an ajax post, but it's getting cancelled. I just made a <code>test.php</code> file which is just supposed to <code>echo 'test';</code> value.</p>
  
  <p>This is how my ajax script looks like:</p>
  
  <pre><code>function loadAd(date) {
      var ajax_url = '&lt;?=URL?&gt;components/ajax/grab_ads.php';
      $.ajax({
          type: 'POST',
          url: ajax_url,
          dataType: 'html',
          data: ({
              date : date
          }),
          cache: false,
          success: function(data) {
              if(data &gt; 0) {
                  $('.advert').fadeIn("fast");
              }       
          },
          error: function(xhr, textStatus, errorThrown) {
              //alert('Nastala chyba. ' + errorThrown);
          }
      });
  }
  </code></pre>
  
  <p>The function is called, I tried console logging it. The variable is passed okay as well. This is what I'm getting in chrome network tab. <a href="http://i41.tinypic.com/de64y1.jpg" rel="noreferrer">screenshot</a></p>
  
  <p>Other than that I am quite helpless.</p>
  
  <p>Edit: I call the function like this:</p>
  
  <pre><code>$datum = Date("d-m-Y H:i:s");
  
  $adl .= '&lt;script type="text/javascript"&gt;
                loadAd(\''.$datum.'\');
           &lt;/script&gt;';
  </code></pre>