Why won't this jQuery function perform properly?
<p>I'm a total noob when it comes to jQuery but I am trying to learn. What in tarnation am I doing wrong here?</p>

<pre><code>function MakeCall(url) { 
var result;
$.ajax({
    url: url,
    dataType: "text",
    success: function(txt) {
        result = txt;
        return;
    }
});
alert(result);
return result;
}
</code></pre>

<p>EDIT:</p>

<p>ok, sorry about that bit of stupidity... i've fixed that part. now my problem is that the alert where it is now is returning "undefined", even though the result is getting set properly in the success function...</p>

<p>Thanks so much...</p>
