JQuery .get in function to return data
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/14220321/how-to-return-the-response-from-an-ajax-call-from-a-function">How to return the response from an AJAX call from a function?</a>  </p>
</blockquote>



<p>Trying to return data to var pNow that called .get function.</p>

<pre><code>/* set var to server side script */
var pNow = getStime();

function getStime() {
$.get('servertime.asp', function (data) {
  return data;
  //alert(data); 
});
}
</code></pre>

<p>alert(data) confirms the data is valid and coming from the server side script but not getting returned to the var that called it.</p>
