How to get the response of XMLHttpRequest?

Posted by Rohan on Stack Overflow See other posts from Stack Overflow or by Rohan
Published on 2010-06-14T16:22:13Z Indexed on 2010/06/14 16:42 UTC
Read the original article Hit count: 155

Filed under:
|

I'd like to know how to use XMLHttpRequest to load the content of a remote URL and have the HTML of the accessed site stored in a JS variable.

Say, if I wanted to load and alert() the HTML of http://foo.com/bar.php, how would I do that?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about xmlhttprequest