validating ajax success response
<pre><code>function run()
{

    $.ajax({
        type: "POST",
        url: "script.php",
        success: function(msg){
        if(msg == "OK"){
        // call a js function
        }else if(msg == "NOT"){
        // call a js function
        }}
    });
}
</code></pre>

<p>I need to run a function base on server response, however when the response is OK it return NOT rather than OK. any idea of why this is happening?</p>
