return from a function ajax
<p>I am having a problem here, if I have a data verification. More of the function $ ajax jquery not return value of true and false, know how I can fix this?</p>

<h3>Example code:</h3>

<pre><code>function ret(as){
    ....codes...
     $.ajax({
        type: "POST",
        url: "../../03",
        data: "as="+as,
        success: function (msg) {
          if(msg == 'true' ){
           ..codes..
           return true;  
          }else{
           ..codes..
           return false;
          }
        } 
    });
  }
</code></pre>

<p>Example call:</p>

<pre><code>var check= ret("user");

if(check== true){
  ..run ..
}
</code></pre>
