How can I get returned value from JavaScript function that contain jQuery.get()?
<p>I have a JavaScript method that call  JQuery.get() and i want to return value from itto callee function ..  the following is the code :</p>

<pre><code>function CheckExistance(userName) {
        $.get(
            "JQueryPage.aspx", { name: userName },
             function(result) {
                 if (result == "1") {
                     value = true;
                 }
                 else if (result == "0") {
                     value = false;
                 }
                 else if (result == "error") {
                     value = false;
                 }
             }
        );                
        return value;
    }
</code></pre>

<p>i want <code>return value;</code> return the value setted in <code>get()</code> function ... i know that <code>get()</code> is asynchronous operation anf i want a solution to do that ?</p>
