Problems with webURL

Jul 15, 2010 at 12:29 PM

I have been using a couple of spservices functions that work correctly as long as I do not set the webURL

For example this works

 $().SPServices({
   operation: "GetList",
 listName: "Tasks",
  async: false,
 completefunc: function (xData, Status) {
 var id = $(xData.responseXML).find("List").attr("ID");
 //alert(xData.responseXML.xml);
 $("#tasksUL").append("<li>List ID: " + id + "</li>");
 }
});

But this does not

 $().SPServices({
    operation: "GetList",
    listName: "Tasks",
   webURL = "http://server/",
   async: false,
 completefunc: function (xData, Status) {
 var id = $(xData.responseXML).find("List").attr("ID");
 //alert(xData.responseXML.xml);
 $("#tasksUL").append("<li>List ID: " + id + "</li>");
 }
});

Any help would be greatly appreciated.

Luis

Coordinator
Jul 17, 2010 at 3:50 AM

Luis:

I've just retested using webURL in several scenarios and it works fine for me. What happens for you when it doesn't work? An error? No results?

Ah, I just saw the problem.  You've got

webURL = "http://server/",

instead of

webURL: "http://server/",

M