Hello Amit,
Try adding dataType:"json" in the ajax call. It should return the JSON object instead of a string. Your modified code will look something like the one shown below.
function getEventData() {
result = "";
$.ajax({
url: "../PHP/PhpAction.php?f=fetchCalendarEvent",
dataType: "json",
async: false,
success: function (data) {
result = data;
}
});
alert(result);
return result;
}
Regards,