title: jQuery Ajax Cross-site scripting
body: <p>I know this question has been asked (many times) before but I still can't seem to get it right.</p>
  
  <p>I want to perform an AJAX request in jQuery and get "arbitrary" contents - e.g. it may be html, text, json, img</p>
  
  <p>When I perform something like the following I get the infamous 
  <strong>No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://mydomain.com" rel="nofollow">http://mydomain.com</a>' is therefore not allowed access.</strong> </p>
  
  <pre><code>$.ajax({
              url: "http://www.pureexample.com/jquery/cross-domain-ajax.html",
              // dataType: "jsonp",
              crossDomain: true,   
              success: function (data) {
                          console.log('success');
                           console.log(data);
  
             },
              error: function(request, status, error) {
                      console.log('Error on request. ' + request.responseText);
                      alert('Error on request. ' + request.responseText);
                  }
          });
  </code></pre>
  
  <p><em>I</em> am not serving the data, so I cannot do anything on the server-side to allow cross domain request.  I believe specifying <strong>JSONP</strong> (commented out) assumes that JSON is being returned? With or without it, it does not work.</p>
  
  <p>So, bottom line - is there a "simple" way to to a cross-domain request so that I may get the result and insert into a tag (e.g. html into a DIV)</p>
  
  <p>Any help, or further explanation is greatly appreciated.</p>
  
  <p>Thanks.
  Rob</p>