Zend and Jquery (Ajax Post)
- by Zend_Newbie_Dev
I'm using zend framework, i would like to get POST data using Jquery ajax post on a  to save without refreshing the page. 
//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 + '&details=' + details,
            success: function(responseText) {
                //alert(responseText)
                console.log(responseText);
            }
        });
    });
});
On my controller, I just don't know how to retrieve the POST data from ajax.
public function saveAction() 
{
    $data = $this->_request->getPost();
    echo $id = $data['id'];
    echo $details = $data['details'];
    //this wont work;
}
Thanks in advance.