This project has moved and is read-only. For the latest updates, please go here.

Issue with MasterPage Configuration? GetListItems won't work.

Feb 10, 2012 at 8:47 PM
Edited Feb 10, 2012 at 8:48 PM
Hi All,
Pardon the ignorance.  Edited the site MasterPage to include SPServices there.
I have a script running as a referenced .txt from a Content Editor Web Part in
SharePoint 2010 that should return the list items from Tasks list and append them to
an HTML <ul>. The jQuery works fine, and the SPServices appears to execute, but I
receive an empty document object ('[object]') as my value for 
the xData.responseXML when the callback is done.  
<ul id="tasksUL"><li>HELLO.</li></ul>

<script language="javascript" type="text/javascript">



  alert('got here');

   var query = "<Query><OrderBy><FieldRef Name='ID'/></OrderBy></Query>";

    operation: "GetListItems",
    async: false,
    listName: "Tasks",
    CAMLQuery: query,
    CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
    completefunc: function (xData, Status) {

      $(xData.responseXML).SPFilterNode("z:row").each(function() {
        var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>";


  var liHtml = '<li>SOME STUFF</li>';

Feb 10, 2012 at 8:56 PM


Try looking at xData.responseXML.xml or xData.responseText. With xData.responseXML, you're looking at the XML object.


Feb 10, 2012 at 9:13 PM
Edited Feb 10, 2012 at 9:42 PM


Thanks for quick response.  I changed it to xData.responseXML.xml and am now seeing the data.  Next step is to get the most current version of your library (am using 0.6.2 at present...) :o)