Get List Items Using SPServices.
var items="";
function GetListItems()
{
jQuery().SPServices({
operation: "GetListItems",
async: false,
listName:masterlstname,
CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
completefunc: function (xData, Status) {
jQuery(xData.responseXML).SPFilterNode("z:row").each(function() {
var title = decodeURIComponent(jQuery(this).attr("ows_Title"));
items = items+title+'\n' ;
});
}
});
alert(items);
}
No comments:
Post a Comment