Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. function httpGetAsync(theUrl, callback)
  2. {
  3. var xmlHttp = new XMLHttpRequest();
  4. xmlHttp.onreadystatechange = function() {
  5. if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
  6. callback(xmlHttp.responseText);
  7. }
  8. xmlHttp.open("GET", theUrl, true);
  9. xmlHttp.send(null);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement