How to return status when using Jquery's .load() function?
<p>I have this action in my controller</p>

<pre><code>public function actionInsertComment()
{
        if (isset($_POST['liga']))
        {

            if(condition)
            {           
                $status = "success";
            }
            else
            {
                $status = "error";
            }

            $this-&gt;renderPartial('ligaWallMessages');
        }
}
</code></pre>

<p>And I'm using JQuery's load function in the following manner:</p>

<pre><code>$('#div_wall_messages').load('insertComment',{comment: comment, liga:idLiga},function(response, status, xhr){
            attachHandlers();
});
</code></pre>

<p>In this example, I am setting the status variable (in the controller) in a way I know for a fact it doesn't work. I read <a href="http://www.w3schools.com/jquery/ajax_load.asp" rel="nofollow">this link</a> and there I understood there are predefined values for status; "success", "notmodified", "error", "timeout", or "parsererror". </p>

<p>I was wondering if there is anyway to set the status variable manually or if I can have a variable returned in some other way. </p>
