var jqxhr = $.post('/local/upload_parser.php', {parse: JSON.stringify(parse_schedule.slice(0,5))}, function(response) {
console.log(response);
alert( "success" );
})
.done(function() {
alert( "second success" );
})
.fail(function() {
alert( "error" );
})
.always(function() {
alert( "finished" );
});
// Perform other work here ...
// Set another completion function for the request above
jqxhr.always(function() {
alert( "second finished" );
});