janroald Posted April 19, 2007 Share Posted April 19, 2007 function foo(callURL) { var xmlhttp = getHTTPObject(); xmlhttp.open('POST', callURL, true); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == && xmlhttp.Status == 200) { var bar = xmlhttp.responseText; } } xmlhttp.send(null); //How can i at this point in the code return the responseText to where the function "foo" was originally called? } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.