This project has moved. For the latest updates, please go here.

Function

$().SPServices

Web Service

Authentication

Supported Operations

Operation Options MSDN Documentation Introduced
Login username, password Authentication.Login Method 0.2.8
Mode None Authentication.Mode Method 0.2.8

Last edited Sep 14, 2009 at 9:28 PM by sympmarc, version 1

Comments

ganbingjie Dec 21, 2016 at 7:00 AM 
I want to get a SharePoint list items from a none-SharePoint host html file. for example I saved this html file on my computer. if I open this single file use IE, yes, I can get all the items. But it's faild if through Chrome or other web browser. I am new on SharePoint, I will die:(

the error message are: " No 'Access-Control-Allow-Origin' header is present on the requested resource" etc.

below is my code:
$().SPServices({
operation: 'Login',
username: 'domain\\userid',
password: 'password',
webURL: 'site url',
completefunc: function (xData, Status) {
$().SPServices({
operation: "GetListItems",
webURL: 'site url',
async: false,
listName: "FruitsList",
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);
});
}
});
}

});