title: ajax form submit cross server
body: <p>I have several servers on an intranet. I am passing data from one server to be processed on another server. Attempting to use ajax but I am a noob.</p>
  
  <pre><code>&lt;script type="text/javascript" src="jquery-1.8.0.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  function print(oForm){
  
  var toggle = oForm.elements["toggle"].value;
  var ticket_type_id = oForm.elements["ticket_type_id"].value;
  var printer_id = oForm.elements["printer_id"].value;
  var store_id = oForm.elements["store_id"].value;
  var data = oForm.elements["data"].value;
  
  var dataString = "toggle="+ toggle+ "&amp;ticket_type_id="+ ticket_type_id+ "&amp;printer_id="+ printer_id+ "&amp;store_id="+ store_id+ "&amp;data="+ data;
  $.ajax(
  {
  type:"POST", 
  url:"http://192.168.12.103/crowncontrol/backend/processes/print.php", 
  data:dataString,
  success: function(data){
  alert("successful");
  }
  }
  );
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>The above URL does not work. 
  But if I make the url:</p>
  
  <pre><code>"../../../backend/processes/print.php"
  </code></pre>
  
  <p>Which is the same location, it works fine.
  Also if I send it via Anchor Get it works fine:</p>
  
  <pre><code>href="http://192.168.12.103/crowncontrol/backend/processes/print.php?etc"
  </code></pre>
  
  <p>The reason I am using ajax is, I want my print.php script to run with out the user noticing. The reason I can't use url:"../../../backend/processes/print.php" is because I will be sending information from one server to another servers on my intranet. </p>
  
  <p>Any help would be appreciated. I've spent far too long trying to get it to work on my own.</p>
  
  <p>AFTER help from the answers below instead of the entire ajax code I used:</p>
  
  <pre><code>$.getJSON('http://192.168.12.103/crowncontrol/backend/processes/print.php?callback=?',dataString,function(res){
      //alert('Success');
  });
  </code></pre>
  
  <p>also:</p>
  
  <pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"&gt;
  </code></pre>