Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: GetListItems

$
0
0
here is my issue. I can get it to work for title. How do I find the $(this).attr("Name") for the other fields


$(document).ready(function() {//-----------SPSERVICES GET ALL LIST ITEMS FROM VendorCategory
alert("test1");
$().SPServices({
    operation: "GetListItems",
    async: false,
    listName: "VendorCategory",
// CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
CAMLViewFields:  "<ViewFields xmlns='http://schemas.microsoft.com/sharepoint/soap/'><FieldRef Name='CategoryImage' /></ViewFields>",
    completefunc: function (xData, Status) { alert("Test2");

     $(xData.responseXML).SPFilterNode("z:row").each(function() { //--------FIND EACH RECORD FROM VendorCategory 
// $(xData.responseXML).find("[nodeName='z:row']").each(function() {
    alert("Test3");
//  var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>";
            var liHtml = "<li>" + $(this).attr("CatergoryImage") + "</li>";
    $("#DisplayIt").append(liHtml);
        });
    }
});
});

Viewing all articles
Browse latest Browse all 6517

Trending Articles