I make a jquery ajax request like so:
$.ajax({
type: 'post',
data: '{user : 1234}',
url: '../../mycontroller-ajax/sort',
success: function (response) {
alert(response);
}
}
);
however, in the controller/action part, I disable the view first
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
but if I echo the
$_POST['user']
It says that the index is not defined
data: {user : 1234},insteaddata: '{user : 1234}',?