title: ajax request to different host
body: <p>i have the following javascript in my webpage:</p>
  
  <pre><code>var xhr = new XMLHttpRequest();
  xhr.open('GET', 'http://www.google.com', true);
  xhr.onreadystatechange = function() {
    if (xhr.readyState == 4) {
      alert('resp received, status:' + xhr.status + ', responseText: ' + xhr.responseText);
    }                                                                       
  };                                                                        
  xhr.send(null);                                                           
  </code></pre>
  
  <p>this executes and finishes w/ a readyState of 4, status of 0, and empty responseText and responseXML.  i know that it is actually sending the request b/c i tried sending the xhr to a server on my machine, and the server does in fact respond.  why am i not getting anything in the responseText?  does it have something to do w/ the fact that the xhr is going to a different server?</p>
  
  <p>when i open up the js debugger and type 'xhr' to inspect the object i get this:</p>
  
  <blockquote>
    <p>XMLHttpRequest<br>
    DONE: 4<br>
    HEADERS_RECEIVED: 2<br>
    LOADING: 3<br>
    OPENED: 1<br>
    UNSENT: 0<br>
    abort: function abort() {<br>
    addEventListener: function addEventListener() {<br>
    dispatchEvent: function dispatchEvent() {<br>
    getAllResponseHeaders: function getAllResponseHeaders() {<br>
    getResponseHeader: function getResponseHeader() {<br>
    onabort: null<br>
    onerror: null<br>
    onload: null<br>
    onloadstart: null<br>
    onprogress: null<br>
    onreadystatechange: function () {<br>
    open: function open() {<br>
    overrideMimeType: function overrideMimeType() {<br>
    readyState: 4<br>
    removeEventListener: function removeEventListener() {<br>
    responseText: ""<br>
    responseXML: null<br>
    send: function send() {<br>
    setRequestHeader: function setRequestHeader() {<br>
    status: 0<br>
    statusText: ""<br>
    upload: XMLHttpRequestUpload<br>
    withCredentials: false  </p>
  </blockquote>