0

Access via JavaScript to Sharepoint list

how is the code look like, when i want retrieve listitems from a list in sharepoint?

9th Jun 2017, 4:54 PM
Arzu S
Arzu S - avatar
1 Antwort
0
Here’s a sample using SPServices JS library. This used the GetListItems operation and returns each item as an object $(document).ready(function() { $().SPServices({ operation: "GetListItems", async: false, listName: "Announcements", 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>"; $("#tasksUL").append(liHtml); }); } }); });
11th Feb 2018, 7:30 AM
Glen Hunt
Glen Hunt - avatar