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

Commented Unassigned: Can't get SPServices 2014.01 to GetList [10223]

$
0
0
I've tried multiple attempts at getting list items and a simple get list with no success. The list exists but is not returning anything.
<script type="text/javascript" src="/SiteAssets/jquery/jquery-1.10.1.js"></script>
<script type="text/javascript" src="/SiteAssets/spservices/jquery.SPServices-2014.01ALPHA1.js"></script>

$(document).ready(function () {
$().SPServices({
operation: "GetList",
listName: "Announcements",
completefunc: function (xData, Status) {
console.log(xData.responseText);
$(xData.responseXML).find("Fields > Field").each(function () {
var $node = $(this);
alert("Type: " + $node.attr("Type") + " StaticName: " + $node.attr("StaticName"));
});
}
});
});
Comments: I dropped you code above into one of my pages which references jquery.SPServices-2014.01ALPHA1.js and it looks fine. If you're building an app for SharePoint 2013, you should really be using CSOM or REST. In any case, you can specify the webURL to point to the site you want to pull from. In the future, post questions like this in the discussion. If something turns out to be an issue with SPServices itself, I'll convert it to an issue here. Thanks, M.

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>