title: Why is my cross domain JSON calls not working?
body: <p>The remote url <code>http://remote-server/json-data.php</code> contains data in this format:</p>
  
  <pre><code>[{"id":"1","partname":"R1","date":"10/12/2012"},{"id":"2","partname":"R2","date":"10/10/2012"},{"id":"3","partname":"R3","date":"07/12/2012"},{"id":"4","partname":"R4","date":"14/06/2012"}]
  </code></pre>
  
  <p>This is my jQuery that is supposed to read the above data and display it in the html or php file. This is currently not working:</p>
  
  <pre><code>$(document).ready(function () {
  var url = "http://remote-server/json-data.php";
  
  var success = function(data){
      data = $.parseJSON(data);
      $.each(data, function(index, element) {
          $('div.outerBox').append('&lt;div&gt;'+element.partname+'/'+element.date+'&lt;/div&gt;');
      });
  }
  
  
  $.ajax({
      type: 'GET',   
      url: url,
      dataType: "jsonp",
      crossDomain: true,         
      cache:false,
      success: success,
      error:function(jqXHR, textStatus, errorThrown){
        alert(errorThrown);
      }
  });
  });
  </code></pre>
  
  <p>When I refresh the page, I get an error message in the javascript alert box, something like this: <code>Error: jQuery142452552225_55355545554 was not called</code>.</p>
  
  <p>I tried putting that remote file into my local server and it seems to work fine with <code>$.getJSON()</code> function. Not sure what I am doing wrong here.</p>