0

But i have an issue though it only returns one record while there are more than one item in the list. Any ideas i did increased the row limit but no luck

$(document).ready(function() {
  $().SPServices({
    operation: "GetListItems",
    async: false,
    listName: "Announcements",
    CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
    completefunc: function (xData, Status) {
      $(xData.responseXML).find("[nodeName=z:row]").each(function() {
        var liHtml = "<li>" + $(this).attr("ows_Title") +  "</li>";
        $("#tasksUL").html(liHtml);
      });
    }
  });
});</script><ul id="tasksUL"/>
1

Try this:

$(document).ready(function() {
  $().SPServices({
    operation: "GetListItems",
    async: false,
    listName: "Announcements",
    CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields><RowLimit>0</RowLimit>",
    completefunc: function (xData, Status) {
      $(xData.responseXML).find("[nodeName=z:row]").each(function() {
        var liHtml = "<li>" + $(this).attr("ows_Title") +  "</li>";
        $("#tasksUL").html(liHtml);
      });
    }
  });
});</script><ul id="tasksUL"/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.