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

New Post: GetListItems

$
0
0
Hello,

I'm trying to use the example get list items script, with no luck at all. Here's my code:
<script language="javascript" type="text/javascript">

$(document).ready(function() {

  $().SPServices({
    operation: "GetListItems",
    async: false,
    webURL: "https://DOMAIN/SITE",
    listName: "Announcements",
    CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
    completefunc: function (xData, Status) {

    alert(xData.responseXML.xml);
      $(xData.responseXML).find("[nodeName=z:row]").each(function() {
        var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>";
        $("#tasksUL").append(liHtml);
      });
    }
  });
});
</script>
<ul id="tasksUL"/>
The list is called 'Announcements' and the webURL is actually the root site in SharePoint. I am calling this from a different web application - a custom mobile site - where I want to show the data from the Announcements list in the non-mobile site.

Safari 6, which I'm using to test gives me the error 'Failed to load resource: the server responded with a status of 440 (login Timeout)', but the completefunc does fire with the xData.responseXML.xml containing nothing when the alert pops up. I'm not exactly sure what I'm doing wrong? Other browsers silently fail - no error except showing xData.responseXML.xml is 'undefined'.

If it makes any difference, traffic is being sent through MS Forefront Threat Management Gateway.

Viewing all articles
Browse latest Browse all 6517

Trending Articles



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