here am trying to get reccurring events from calendar list with the help of SPServices i have a code as shown bellow,but when am using the bellow code it is giving me erroe as
"https://MYURL/Scripts/jquery-1.9.1.min.js Failed to load resource: the server responded with a status of 500 (Internal Server Error)send @ jquery-1.9.1.min.js:5"
and it also shows WARNING as
"jquery-1.9.1.min.js:5 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/."
$(document).ready(function () {
var start = new Date();
$().SPServices({
operation: "GetListItems",
async: false,
listName: "ListName",
CAMLViewFields: "<ViewFields>" +
"<FieldRef Name='Title' />" +
"<FieldRef Name='EventDate' />" +
"<FieldRef Name='EndDate' />" +
"<FieldRef Name='Location' />" +
"<FieldRef Name='Description' />" +
"<FieldRef Name='fRecurrence' />" +
"<FieldRef Name='RecurrenceData' />" +
"<FieldRef Name='fAllDayEvent' />" +
"</ViewFields>",
CAMLQuery: '<Query>' +
'<CalendarDate>' + start + '</CalendarDate>' +
'<Where>' +
'<DateRangesOverlap>' +
'<FieldRef Name="EventDate" />' +
'<FieldRef Name="EndDate" />' +
'<FieldRef Name="RecurrenceID" />' +
'<Value Type="DateTime">' +
'<Year />' +
'</Value>' +
'</DateRangesOverlap>' +
'</Where>' + '<OrderBy>' +
'<FieldRef Name="EventDate" />' +
'</OrderBy>' +
'</Query>',
CAMLQueryOptions: '<QueryOptions>' +
'<CalendarDate>' + start + '</CalendarDate>' +
'<RecurrencePatternXMLVersion>v3</RecurrencePatternXMLVersion>' +
'<ExpandRecurrence>TRUE</ExpandRecurrence>' +
'</QueryOptions>',
completefunc: function (xData, Status) {
var events = [];
// alert(xData.responseXML.xml);
alert($(xData.responseXML).find("[nodeName=rs:data]").attr("ItemCount"));
$(xData.responseXML).find("[nodeName=z:row]").each(function () {
var fADE = $(this).attr("ows_fAllDayEvent");
if (fADE != null) {
if (fADE == 0) { thisADE = false }
else thisADE = true;
}
var thisID = $(this).attr("ows_ID");
var sepID = thisID.indexOf(';#');
if (sepID != -1) thisID = thisID.substring(0, sepID);
var thisTitle = $(this).attr("ows_Title");
var thisRecurrence = $(this).attr("ows_fRecurrence");
var thisDesc = $(this).attr("ows_Description");
if (thisID.length > 3) alert(thisTitle + ": " + thisID);
var thisUrl = "DispForm.aspx?ID=" + thisID + "&Source=FullCalendar.aspx";
var thisRD = $(this).attr("ows_RecurrenceData");
events.push({
// className: ownerClass, \\Will be an @attrib in the responseXML
title: thisTitle,
start: $(this).attr("ows_EventDate"),
end: $(this).attr("ows_EndDate"),
allDay: thisADE,
url: thisUrl,
description: thisDesc
});
});
}
});
});