title: JQuery Ajax error with XHR status is 0; means not connected
body: <p>I have following snippet of code </p>
  
  <pre><code>   $.ajax({
              method  :   "GET",
              url     :   'http://projectstorehouse.com/travelnews/index.html',
              data    :   "",
              success :   function(){
                              alert("Hello");
                          },
              error   :   function(jqXHR, status, error){
                          if (jqXHR.status === 0) {
                              alert('Not connected.\nPlease verify your network connection.');
                          } else if (jqXHR.status == 404) {
                              alert ('The requested page not found. [404]');
                          } else if (jqXHR.status == 500) {
                              alert ('Internal Server Error [500].');
                          } else if (exception === 'parsererror') {
                              alert ('Requested JSON parse failed.');
                          } else if (exception === 'timeout') {
                              alert ('Time out error.');
                          } else if (exception === 'abort') {
                              alert ('Ajax request aborted.');
                          } else {
                              alert ('Uncaught Error.\n' + jqXHR.responseText);
                          }
              }
          });
  </code></pre>
  
  <p>and could not figure out problem associated with it; the message displayed with this is jqXHR.status==0. Url is reachable <a href="http://projectstorehouse.com/travelnews/index.html" rel="nofollow">http://projectstorehouse.com/travelnews/index.html</a></p>
  
  <p>Can anybody tell me where I am wrong;</p>