This project has moved. For the latest updates, please go here.

GetListItems in Chrome/Firefox (0.7.1a)

Oct 2, 2012 at 5:11 PM

The code below is operating fine in IE9 but does not fire in Chrome or Firefox. In both browsers I get a Status of 'error' and a blank responseText for the GetListItems call (and the UpdateListItems is obviously never hit). Any recommendations for how to further debug this?

    var itemID = 4;
    var list = "Document Tracking";
    var viewFields = '<ViewFields><FieldRef Name="ID" /></ViewFields>';

        operation: "GetListItems",
        listName: list,
        CAMLQuery: '<Query><Where><And><Eq><FieldRef Name="ID" /><Value Type="Counter">' + itemID + '</Value></Eq><Eq><FieldRef Name="Status" /><Value Type="Choice">Available</Value></Eq></And></Where></Query>',
        CAMLViewFields: viewFields,
        completefunc: function (xData, Status) {
            alert(xData.responseText); // returns xml data
            $(xData.responseXML).SPFilterNode("z:row").each(function () {
                //Update the status to viewed
                    operation: "UpdateListItems",
                    async: false,
                    ID: itemID,
                    listName: list,
                    valuepairs: [["Status", "Viewed"]],
                    completefunc: function (xData, Status) {
                        //alert("Status=" + Status + " XML=" + xData.responseXML.xml);

Oct 3, 2012 at 12:53 AM
Is the webservices url reachable via those browses? The URL is be http://<Site>/_vti_bin/Lists.asmx (replace <Site> with your site)
Also what is value of the Status variable?


Sent from mobile device.

Oct 3, 2012 at 12:58 PM

Odds are it's an authentication issue. When you browse to the site in Chrome or Firefox, are you challenged for credentials?


Oct 3, 2012 at 1:12 PM

Paul - I can reach the web service from the browser without issue. The status variable returns 'error'.

Marc - I think you are correct. I do get challenged when I browse to that site in Chrome/Firefox. Guess I'll crack open Fiddler and see if I can learn anything else. Thanks, and great work on SPServices its been an invaluable tool for me.

Oct 3, 2012 at 1:21 PM
The fact that the Status variable returns Error supports the fact that the service is unreachable via webservices... That's teh browser status on whether it was successfully able to send and receive a response to the webservice.

Paul T