Passing a value to the server on a click event

I am using google maps and would like to pass the latlng value back to the server as follows

google.maps.event.addListener(map, ‘click’, function(event) {
alert(event.latLng);
post_to_url(‘updll.php’, {‘latlng’: event.latLng});
location.reload();
placeMarker(event.latLng);
});

The event.latLng gives me the coordinates and the location.reload() reloads the page, but I need to pass the coordinates in to the server so they can be acted upon by the server before the page reloads.

What is the best way to do this?

Got it figured out. Case closed.