title: Why does my $.ajax request always fail?
body: <p>This is how I use <code>$.ajax</code></p>
  
  <pre><code>var link = "http://www.myapp.net/..."
  
  $.ajax({
      url: link,
      cache: false,
      async: false,
      success: function(html){
  
      },
      error: function(){
  
      }
  });
  </code></pre>
  
  <p>The result of the request is either an empty page or a page with just a number. So error callback actually should never be triggered, as long as the request does not fail.</p>
  
  <p>But I always get the following error</p>
  
  <pre><code>alert(jqXHR + "-" + textStatus + "-" + errorThrown);
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/nIU1a.png" alt="enter image description here"></p>
  
  <p><a href="http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_%28NS_ERROR_NOT_AVAILABLE%29" rel="nofollow noreferrer">Here is some information about the error code in the picture</a></p>
  
  <p>I run my project on localhost. The link in the ajax code points to another project on the web.</p>
  
  <p>Any ideas?</p>