jquery $.post function call order
<p>In the following jquery function, can someone explain to me why "second" is being executed before "first"?  I assume that the entire $.post request should be completed before the browser moves on to the next line of code, but that does not appear to be happening.</p>

<pre><code>function getGUID () {
$.post(getGUIDScript, function(data, textStatus) { 
 alert("first");
 GUID = data;
 }, 
 'text');

 alert("second");  
}
</code></pre>

<p>Thanks for the responses below guys.  For posterities sake, the code above can be written as is shown below to wait until the post is completed before moving on.</p>

<pre><code>function getGUID () {
$.ajax({
type: "POST",
url: getGUIDScript,
async: false,
success: function(data) {
 alert("first");
 GUID = data;
}
});
    alert("second");
}
</code></pre>

<p>This will set off the first alert and then the second.</p>
