Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><code>complete</code> executes after either the <code>success</code> or <code>error</code> callback were executed.</p> <p>Maybe you should check the second parameter <code>complete</code> offers too. It's a String holding the type of success the ajaxCall had.</p> <p>The different callbacks are described a little more in detail here <a href="http://docs.jquery.com/Ajax/jQuery.ajax#options" rel="noreferrer"><code>jQuery.ajax( options )</code></a></p> <hr> <p>I guess you missed the fact that the <code>complete</code> and the <code>success</code> function (I know inconsistent API) get different data passed in. <code>success</code> gets only the data, <code>complete</code> gets the whole <code>XMLHttpRequest</code> object. Of course there is no <code>responseText</code> property on the data string.</p> <p>So if you replace <code>complete</code> with <code>success</code> you also have to replace <code>data.responseText</code> with <code>data</code> only.</p> <p><strong>success</strong></p> <blockquote> <p>The function gets passed two arguments: The data returned from the server, formatted according to the 'dataType' parameter, and a string describing the status.</p> </blockquote> <p><strong>complete</strong></p> <blockquote> <p>The function gets passed two arguments: The XMLHttpRequest object and a string describing the type of success of the request.</p> </blockquote> <p>If you need to have access to the whole <code>XMLHttpRequest</code> object in the success callback I suggest trying this.</p> <pre><code>var myXHR = $.ajax({ ... success: function(data, status) { ...do whatever with myXHR; e.g. myXHR.responseText... }, ... }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload