Why doesnt work CAMLQueryOptions code in operation: "GetListItems" in SPservices for display all items without folders?

StackOverflow https://stackoverflow.com/questions/16113308

This is my code, works fine for folders, but I want to get all item without folders.

Code for get list items.

var qo = '<QueryOptions><ViewAttributes Scope="Recursive"/></QueryOptions>';    

$().SPServices({
operation: "GetListItems",
async: false,
listName: list,
CAMLViewFields: f,
CAMLLimit: l,
CAMLQuery: q,    
CAMLQueryOptions: qo,



completefunc: function (xData, Status) {

 $(xData.responseXML).find("[nodeName='z:row']").each(function(i) {
        var liHtml = "<tr><td>" + $(this).attr("ows_Title") + "</td> <td>" + $(this).attr("ows_LinkFilenameNoMenu") + "</td> <td>" + $(this).attr("ows_Created") + "</td>  </tr>";
        var title = $(this).attr("ows_LinkTitle")

      $("#tasksUL").append(liHtml);

  });
   }
 });
有帮助吗?

解决方案

The solution was as clear as crystal.

Change thus code:

$(xData.responseXML).find("[nodeName='z:row']").each(function(i) {

for this:

$(xData.responseXML).SPFilterNode("z:row").each(function() {   
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top