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

Closed Unassigned: Getting parser error in simple SP services. [10156]

$
0
0
I am getting parser error in simple spsservices code. I couldnot able to locate my list .I have this code in my master page and the list in my root site. Any help appreciated.

$(document).ready(function() {
GetProductDetails("flexspacePink");
});
function GetProductDetails(sessionVariable)
{
$().SPServices({
operation: "GetListItems",
async: false,
listName: "SidebarList",
CAMLQuery:"<Query><Where><Eq><FieldRef Name='Class' /><Value Type='Text'>"+sessionVariable+"</Value></Eq></Where></Query>",
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>";
$("#tasksUL").append(liHtml);
});
}
});
}

Comments: If you've got this code in your master page, then you'll definitely need to provide the WebURL for the list, as the context will be different depending upon the user's location in the site topology. In the future, please posts things like this in the discussions. If we determine that it is an issue with SPServices itself, I'll copy it into 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>