I have something like this:
$.ajax({
type: "POST",
url: "index/test",
data: { from: from, to: to }
}).done(function(res) {
alert(res);
});
and the answer from the controller is:
public function testAction()
{
echo 555;
}
But the problem is that, this returns the layout with the answer echo 555;
How can I deny to render the layout and only leave the echo answer?