title: Ajax dosn´t Work Codeigniter
body: <p>My Ajax request is this, when i click on the button, send me to validarData, but never return the done ajax method.</p>
  
  <pre><code>$( document ).ready(function(){
      $('#save').on('click', ejecturarAjax);
  });
  
  function ejecturarAjax(event)
  {   
  var jqxhr = $.ajax({ 
      url: "&lt;?php echo base_url(); ?&gt;index.php/padron/validarData", //controller, don´t get any post data, just take the control, and never return anything.
      data: "id="+ '102030', //data what i what to get.
      type: "POST", 
      dataType: "json"    
  });
  
  jqxhr.done(function(data) {
      alert(data.id);  //dosn´t work.
  });
  
  jqxhr.fail(function(XMLHttpRequest, textStatus, errorThrown) {
      alert( errorThrown ); //don´t show any error.
  });
  
  jqxhr.always(function() {
      alert( 'first complete');  //don´t show the alert.
  });
  
  event.preventDefault();
  };
  </code></pre>
  
  <p>index.php/padron/validarData, doesn´t retrive data from ajax:</p>
  
  <pre><code>class Padron extends CI_Controller {
  
  public function index(){
         //Index Page
  }
  
  public function validarData()
  {
  
      $id = $this-&gt;input-&gt;post('id');
  
      $data["id"] = $id;
  
      $this-&gt;output-&gt;set_content_type('application/json');
  
      $result= json_encode( $data);
  
      echo $result;
  }
  }
  </code></pre>
  
  <p>Please, help me!!!</p>