I'm starting to develop in SharePoint Online, but I don't arrive to do work spservices()
with GetListItems()
.
I have create an application with napacloudapp
In this application I have put that :
<script language="javascript" type="text/javascript">
$(document).ready(function() {
$().SPServices({
operation: "GetListItems",
async: false,
webURL: "https://mycompagny.sharepoint.com/sites/test",
listName: "Contacts",
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);
});
alert(xData.responseText);
}
});
});
</script>
So when I run my project with my alert(xData.responseText);
I can see
"the List does not exist. The page you selected contains a list that does not exist. It may have been deleted by another user."
I have added weburl parameter like Amal and bgmcoder said. Now in the console I have this error :
Failed to load resource: the server responded with a status of 405 (Method Not Allowed)
/Lists/
not/List/