title: Trouble with "Uncaught SyntaxError: Unexpected token <"
body: <p>I have successfully requested to a Basecamp XML file via ajax, but it throws an error (in Google Chrome):</p>
  
  <p><em>Resource interpreted as Other but transferred with MIME type undefined. Uncaught SyntaxError: Unexpected token &lt;</em></p>
  
  <p>Firefox give me an error too, but it's a complete different one. I cannot modify the XML file, and the XML file structure is correct. I tried and searched but can find out what's wrong. Any helps would be appreciated.</p>
  
  <p>Here is the jQuery code:</p>
  
  <pre><code>$(document).ready(function() {
      $.ajaxSetup({accepts:'text/xml',cache:false});
      $.ajax({
              type: 'GET',
              dataType: 'jsonp',
              contentType: 'text/xml',
              mimeType: 'text/xml',
              crossDomain: true,
              url: url,
              beforeSend: function(xhr) {
                      var bytes = Crypto.charenc.Binary.stringToBytes(username+":"+password);
                      var base64 = Crypto.util.bytesToBase64(bytes);
                      xhr.overrideMimeType("text/xml;charset=UTF-8");
                      xhr.setRequestHeader("Authorization", "Basic " + base64);
              },
              complete: function(xhr, status) {
                      if (status === 'error' || !xhr.responseText) {
                          $('.result').html('&lt;p&gt;&lt;strong&gt;Error:&lt;/strong&gt; ' + status + "&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Response Text&lt;/strong&gt;:&lt;br /&gt;&lt;pre&gt;"+xhr.responseText+"&lt;/pre&gt;&lt;/p&gt;");
                      } else {
                          var data = xhr.responseText;
                          $('.result').html("&lt;pre&gt;"+data+"&lt;/pre&gt;");
                      }
              }
              });
      });
  </code></pre>