0

I would like to get the position object sent to php.

html:

onclick="name(event)">

js:

function name(e)
{
      $.ajax({
        url: '/...',
        type: 'post',
        data: {'x': JSON.stringify(e)}
      });
}

php:

json_decode($request['x'])->pageX; // doesn't work

How can I read the position of this object? I use laravel.

Sherif
  • 11,786
  • 3
  • 32
  • 57
Estern
  • 129
  • 1
  • 2
  • 10

0 Answers0