JQueryAjax
/* Act on the event */
var data_content = 'Some Content';
console.log(data_content);
$.ajax({
url:'control.php',
type:'POST',
data: data_content,
success: loadNextEvent,
error: function(xhr, desc, err) { console.log(xhr + "| Details: " + desc + "\nError:" + err); }
})
.done(function() {
alert( "success" );
})
.fail(function() {
alert( "error" );
})
.always(function() {
alert( "complete" );
});