how to acces the responseText in the jqxhr.complete function
<p>first of all i'm a complete javascript and jQuery noob so i'm sorry if this question is dumb. but i really haven't found the answer in the jQuery documentation or on google</p>

<p>i'm trying to perform an action on the response when the request is completed 
but i can't access responseText. i was under the impression the an jqxhr objext has a member responseText. but i get the following error 'responseText is not defined'.</p>

<pre><code>this.load = function(fileName, actionFunction){
    var jqxhr = $.post(SERVER,{command : "load", filename : fileName})
    .complete(function(){ 
        actionFunction(responseText);
    });
}
</code></pre>

<p>EDIT</p>

<p>if i do</p>

<pre><code>.complete(function(responseText){ actionFunction(responseText);}
</code></pre>

<p>or what Dave Ward suggest</p>

<p>i don't get an error but nothing happens</p>

<p>i know it isn't the  actionFunction() because if i input a string manually for testing purposes it does what i expect it to do.</p>

<p>when trying to see what parameter gets past on (prinintg it to the console in actionfunction)  i get [object Object]; even when trying to convert it to a string (String(parameter)) </p>

<p>END EDIT</p>

<p>what am i doing wrong or how do i access responseText in the .complete function ?</p>

<p>tnx in advance</p>
