Using SPServices with Office 365 wave 15 public site

Apr 2, 2013 at 5:10 PM
Hi Marc

I have a custom calendar list (because Office 365 wave 15 public site does not have one !!)

I am using <script type="text/javascript" src="/JavaScript/JQuery/jQCalendarPart/jquery.SPServices-0.7.2.min.js"></script>

I am using $().SPServices({
operation: "GetListItems",
async: false,
listName: "Calendar", 
CAMLViewFields: camlFields,
CAMLQuery: camlQuery,
CAMLQueryOptions: camlOptions,
completefunc: getDocsWithQuerySuccess
to attempt to get list items from my custom list anonymously

camlQuery = "<Query></Query>";
  camlOptions = "<QueryOptions></QueryOptions>";
  camlFields = "<ViewFields><FieldRef Name='Title' /><FieldRef Name='StartDate' /><FieldRef Name='_EndDate' /><FieldRef Name='Location' /><FieldRef Name='Description' /></ViewFields>";
The SPServices call is executed and the code jumps into :-
function getDocsWithQuerySuccess(xData, status)
but xData is "undefined"

Anybody got any ideas ??


Apr 2, 2013 at 8:52 PM
Try moving what you have in the getDocsWithQuerySuccess function into the completefunc. You're not passing anything to the function.

Apr 2, 2013 at 9:53 PM
sympmarc wrote:
Try moving what you have in the getDocsWithQuerySuccess function into the completefunc. You're not passing anything to the function.

Hi Marc

I have just put an alert(xData) next to the completefunc the for the time been to see if anything does come back.

Still says "undefined"


Apr 2, 2013 at 10:17 PM
Hi Marc

However, if I run Fiddler I get this :-

-<GetListItemsResult>-<listitems xmlns:z="#RowsetSchema" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882">-<rs:data ItemCount="2"><z:row ows_FileRef="1;#Lists/Calendar/1_.000" ows_RoutingRuleDescription="This is a test of Item number 1" ows_Modified="2013-03-30 13:58:50" ows_PermMask="0x7fffffffffffffff" ows_Created="2013-03-30 13:58:50" ows_FSObjType="1;#0" ows_owshiddenversion="1" ows_UniqueId="1;#{3A6C97CD-EC4E-4F1B-A391-D0B4F3BDF3C3}" ows_ID="1" ows__Level="1" ows__ModerationStatus="0" ows_MetaInfo="1;#" ows__EndDate="2013-03-30 14:00:00" ows_StartDate="2013-03-30 00:00:00" ows_Title="Tst Number 1"/><z:row ows_FileRef="2;#Lists/Calendar/2_.000" ows_RoutingRuleDescription="April First Event" ows_Modified="2013-04-02 11:01:47" ows_PermMask="0x7fffffffffffffff" ows_Created="2013-04-02 11:01:47" ows_FSObjType="2;#0" ows_owshiddenversion="1" ows_UniqueId="2;#{91141DD0-CD9A-4D5E-A4B2-F809F8933886}" ows_ID="2" ows__Level="1" ows__ModerationStatus="0" ows_MetaInfo="2;#" ows__EndDate="2013-04-15 01:00:00" ows_StartDate="2013-04-15 12:00:00" ows_Title="April first Event"/></rs:data></listitems></GetListItemsResult>

should this not appear in xData ??

Maybe I am being thick here.

Apr 2, 2013 at 10:21 PM
Hi Marc

I see there has been a lot of chatter at the end of 2011 about the new version of JQuery (1.7) causing issues .

There are the include files I am using :-

<script type="text/javascript" src="/JavaScript/JQuery/jQCalendarPart/jquery-1.8.2.min.js"></script>
<script src="/JavaScript/JQuery/jQCalendarPart/jquery.ui.core.min.js"></script>
<script src="/JavaScript/JQuery/jQCalendarPart/jquery.ui.datepicker.min.js"></script>
<link rel="stylesheet" type="text/css" href="/JavaScript/JQuery/jQCalendarPart/jquery-ui-1.9.1.custom.min.CSS"/>
<script type="text/javascript" src="/JavaScript/JQuery/jQCalendarPart/jquery.SPServices-0.7.2.min.js"></script>

I thought SPServices-0.7.2 was a "good" version.


Apr 2, 2013 at 11:31 PM
Your versions look good, and you're seeing the results in Fiddler. Now it's just a matter of getting the getDocsWithQuerySuccess function doing what you want.