I'm doing an AJAX call like so:
function getEvents(info){
$.ajax({
url: 'get_all_events.php',
data: {year: info['year'],month: info['month']},
type: 'POST',
dataType: 'json',
success: function (result) {
alert(JSON.stringify(result));
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
console.log(XMLHttpRequest.statusText);
console.log(textStatus);
console.log(errorThrown);
}
});
}
Which works on the initialization of the calendar app I'm developing. I create an object 'info' and assign it month/date etc... then when the user presses 'Previous' or 'Next' it reassigns certain variables of the 'info' object and calls getEvents again. I tried re-writing my query, rewriting my AJAX call, adding contentType... nothing seems to work.