i'm getting Failed to load resource: the server responded with a status of 500 (Internal Server Error)
http://Sharepoint/sites/sitecollection.
when i try to get list items with below code.
var MNSName = "";
var siteurllink = "http://Sharepoint/sites/sitecollection/";
var method = "GetListItems";
var query = "<Query>" +
"<Where>" +
"<Eq>" +
"<FieldRef Name='Active' /><Value Type='Boolean'>1</Value>" +
"</Eq>" +
"</Where>" +
"</Query>";
var fieldsToRead = "<ViewFields>" +
"<FieldRef Name='Name' />" +
"<FieldRef Name='FirstName' />" +
"<FieldRef Name='LastName' />" +
"</ViewFields>";
$().SPServices({
operation: "GetListItems",
webURL: siteurllink,
async: false,
listName: "ListName",
CAMLViewFields: fieldsToRead,
CAMLQuery: query,
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function () {
MNSName = $(this).attr("ows_FirstName") + " " + $(this).attr("ows_LastName");
});
}
});
http://Sharepoint/sites/sitecollection.
when i try to get list items with below code.
var MNSName = "";
var siteurllink = "http://Sharepoint/sites/sitecollection/";
var method = "GetListItems";
var query = "<Query>" +
"<Where>" +
"<Eq>" +
"<FieldRef Name='Active' /><Value Type='Boolean'>1</Value>" +
"</Eq>" +
"</Where>" +
"</Query>";
var fieldsToRead = "<ViewFields>" +
"<FieldRef Name='Name' />" +
"<FieldRef Name='FirstName' />" +
"<FieldRef Name='LastName' />" +
"</ViewFields>";
$().SPServices({
operation: "GetListItems",
webURL: siteurllink,
async: false,
listName: "ListName",
CAMLViewFields: fieldsToRead,
CAMLQuery: query,
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function () {
MNSName = $(this).attr("ows_FirstName") + " " + $(this).attr("ows_LastName");
});
}
});