hello
Have problem with sending ajax data.
piece of my js code
document.onkeydown = function(e) {
if (e.keyCode == 37)
{
data = 'left arrow';
$.ajax({
type: "POST",
url: "index/getAjax",
data: data
});
}
}
I expect to get $_POST at indexController, actiongetAjax method
public function actiongetAjax()
{
echo "POST Comes: ".var_dump($_POST);
}
due to console, Headers and data sended correct and request made.
What should i do to fix that?
Thanx!