title: With jQuery, why Success Callback isn't executed when a JSON is returned via Ajax?
body: <p>I have the following PHP code that returns a JSON object via Ajax to the client.</p>
  
  <pre><code>function loadAll(){
      $knowledgeHandler = new KnowledgeLevelHandler();
      $json = $knowledgeHandler-&gt;loadAll();        
      header('Content-type: application/json');
      print $json;
  }
  </code></pre>
  
  <p>I have a test function assigned to the success callback of jQuery Ajax.</p>
  
  <pre><code>successCallback = function(data){
      alert("A");
  }
  
  options = {    
      "data": data,
      "async": false,
      "type": "post",
      "success":successCallback        
  }
  $.ajax(url, options);
  </code></pre>
  
  <p>When I remove the <code>header('Content-type: text/json');</code> from PHP code, the callback is executed, but when it is executed, the success callback isn't executed. What is wrong? </p>