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? } Link to comment https://forums.phpfreaks.com/topic/47747-accessing-the-responsetext-in-the-outer-function/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.