title: Event on marker drag Google Maps API V3
body: <p>I created and event listener to perform a function when the user drag a marker but it's not working, could anyone help me ?</p>
  
  <p>This is the event listener</p>
  
  <pre><code>google.maps.event.addListener(marker, 'dragend', enviarParaASP(marker));
  </code></pre>
  
  <p>And the function:</p>
  
  <pre><code>function enviarParaASP(marcador) {
              coordenadaASalvar = { latitude: marcador.position.d, longitude: marcador.position.e };
  
              jQuery.ajax({
                  url: 'GoogleMapsGeolocation.aspx/SalvaCoordenadas',
                  type: "POST",
                  data: JSON.stringify({'coord': coordenadaASalvar}),
                  contentType: "application/json; charset=utf-8",
                  dataType: "json",
                  success: function (msg) { alert("OK "); },
                  failure: function (msg) { alert("Sorry!!! "); }
              });
  </code></pre>