title: How to do cross domain ajax in jQuery with dataType 'text'?
body: <p>In my javacript function I call this ajax. It works fine but only when I access the web page from <code>firebird</code> server. I have the same code on my <code>testing</code> server. The ajax asks to download some files but only firebird server has its ip registers with our clients to be able to scp there. I need to do the same if I access the php files from testing server. All the servers are inside intranet.</p>
  
  <ul>
  <li>is it possbile to use dataType <code>text</code> to do so?</li>
  <li>do I need to do any changes on the server side?</li>
  </ul>
  
  <p>ajax call:</p>
  
  <pre><code>url = "https://firebird"+path+"/tools.php?";    
  
  jQuery.ajax({
      type: 'get',
      dataType: 'text',
      url: url,
      data: {database: database_name, what: 'download', files: files, t: Math.random() },
      success: function(data, textStatus){
          document.getElementById("downloading").innerHTML+=data;
      }
  });
  </code></pre>
  
  <h1>Update 1</h1>
  
  <p>My little web application restores databases so I can do my testing on them. Now I want to enhance it so I can connect to our customers and download a particular backup. Our customer allowed only <code>firebird</code> server to connect to their networks. But I have my own server dedicated to <code>testing</code>. So every time I want to download a database I need to connect <code>firebird</code>. The source of my web application and the folder with all backups are mounted into the same location on both servers <code>firebird</code> and <code>testing</code>. Right now my solution (for downloading) works but only from firebird.  I work basically only <code>testing</code> server though.</p>
  
  <h1>Update 2</h1>
  
  <p>I make two ajax calls. One is pure jQuery call (I guess I can apply any solution to this one) and the other one is ajax call from jsTree. I created <a href="https://stackoverflow.com/questions/7224928/can-i-specify-datatype-in-jstree-ajax-call">new question</a> for that one. I seems to me that <code>I have to</code> go for @zzzz's option b). </p>