title: Zend and Jquery (Ajax Post)
body: <p>I'm using zend framework, i would like to get POST data using Jquery ajax post on a  to save without refreshing the page. </p>
  
  <pre><code>//submit.js
  
  $(function() {
  
      $('#buttonSaveDetails').click(function (){
          var details = $('textarea#details').val();
          var id = $('#task_id').val();
          $.ajax({
              type: 'POST',
              url: 'http://localhost/myproject/public/module/save',
              async: false,
              data: 'id=' + id + '&amp;details=' + details,
              success: function(responseText) {
                  //alert(responseText)
                  console.log(responseText);
              }
  
          });
      });
  });
  </code></pre>
  
  <p>On my controller, I just don't know how to retrieve the POST data from ajax.</p>
  
  <pre><code>public function saveAction() 
  {
  
      $data = $this-&gt;_request-&gt;getPost();
      echo $id = $data['id'];
      echo $details = $data['details'];
      //this wont work;
  }
  </code></pre>
  
  <p>Thanks in advance.</p>