title: XMLHTTPRequest - Test for Connection instead of .send(null) failure
body: <pre><code>    var xml = null;
      xml = new XMLHttpRequest();
      xml.open("get", who, false);
              xml.send(null);
      if ((xml.status &gt;= 200 &amp;&amp; xml.status &lt;= 300) || xml.status == 304) {
      var hi = xml.responseText;
      } else {
      alert("No Internet Connection! You will have to enter information by hand");
      };
  </code></pre>
  
  <p>I want set up this alert where if there is no internet connection, it will say so. However, the browser stops/hangs at xml.send(null) with NS_ERROR_FAILURE:Failure. How can set up the test properly for a connection?</p>