title: Ajax post onbeforeunload doesn't work
body: <p>This code stores mouse movement coordinates in array and it should post it onbeforeunload. But it doesn't post. If I change</p>
  
  <p>name: moves<br>
  to<br>
  name: "blabla"</p>
  
  <p>it works. Means that the problem is on the "moves" variable. How can I make it working ?</p>
  
  <pre><code>$(document).ready(function(){
  
  
  var moves = [];
  
  $("html").mousemove(function(e){
  moves.push(e.pageX + "x" + e.pageY) 
  });
  
  
  window.onbeforeunload = function() {
  
  $.ajax({
  
        type: "POST",
        url: "mailyaz.php",
        data: {
        name: moves;
        }
        });
  
  });
  
  });
  </code></pre>