I'm trying to do this:
$(window).unload( function () {
$.ajax({
type: "POST",
url: "http://localhost:8888/test.php?",
data: "test",
success: function(msg){
alert( "Data Saved: " + msg );
}
});
alert (c);
});
However, the success alert is never shown, nor does this request seem to be even hitting the server. What am I doing wrong? Thanks!