This project has moved and is read-only. For the latest updates, please go here.

WebUrl not working

Nov 5, 2014 at 6:53 PM
I'm trying to connect to a list on a sub site and I'm trying to use WebUrl as such:
    operation: "GetListItems",
    webUrl: "/parent/subsite/subsitehostingthelist/",
    async: false,
    listName: "Questions",
    CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
    completefunc: function (xData, Status) {
      $(xData.responseXML).SPFilterNode("z:row").each(function() {
        responses = $(this).attr("ows_Title") + "<br>";

and nothing is coming back, I've looked at the webUrl and even copied and pasted code and still nothing, am I missing something, is there a different way to connect to a list within a sub site?

The page I'm trying to do this from is running under a different sub site if that makes a difference
Nov 5, 2014 at 7:37 PM
Very basic problem: it's webURL, not webUrl.

Some of my early spelling decisions were a little inconsistent, but they should all be clearly spelled out in the docs.

Nov 5, 2014 at 7:38 PM
Edited Nov 5, 2014 at 7:39 PM
I've tried webURL, WebURL, weburl, etc. and nothing. Could it be a permission issue on the list itself?

I even tried a fully qualified URL 'http://appname/site/subsite/lists/' and nothing
Nov 5, 2014 at 7:39 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Nov 5, 2014 at 7:42 PM
Take a look at the Net traffic and see if you're getting anything in the response that tells you what is going on.

Nov 5, 2014 at 7:51 PM
i'm gettting

'there is no web named '/parent/subsite/subsitehostingthelist/_vti_bin/lists.asmx'
Nov 5, 2014 at 8:03 PM
Edited Nov 5, 2014 at 8:04 PM
With the code as posted above? The _'vti_bin/lists.asmx' shouldn't be there.

Nov 5, 2014 at 8:06 PM

then I changed it to call the List ID and then I get

[list does not exist]
[the page you selected contains a list that does not exist]

Now, i'm in the list and I can run this code (without webURL) on a page within the subsite that list resides in and pull back data.
Nov 5, 2014 at 8:08 PM
You're losing me. Obviously there's no way for me to know if your webURL and listName are correct. The listName can be the name, e.g., "Announcements" or the GUID.

Nov 5, 2014 at 8:10 PM
when i run dev tools in IE and look at the [network] information I'm getting

[list does not exist]
[page you selected contains a list that does not exist]

for the list i'm trying to connect to.

Now, If I take the code I'm trying to run and move it to a page within the subsite that the list lives in, I can connect and pull back data from that list.

I changed the listname: {list guid} and nothing still
Nov 5, 2014 at 8:21 PM
Odds are your webURL is wrong.

Nov 5, 2014 at 8:23 PM
I copied it right from the list setting page itself and still get the error messages. I had a full qualified URL in the webURL parameter
Nov 5, 2014 at 8:31 PM
What you have above looks right, at least syntactically.
    webUrl: "/parent/subsite/subsitehostingthelist/",
Nov 5, 2014 at 8:39 PM
yeah, I'm at a loss with it.
Nov 5, 2014 at 9:13 PM
Can you paste in the full URL for the AllItems page for the list?

Nov 6, 2014 at 12:39 PM
Nov 6, 2014 at 1:45 PM
I got it working, not sure what happened between last night and today but I got it working with just using

webURL: "/vendors/vendoruniversity/events/lists/faq/",

this worked
Marked as answer by sharepointguy12 on 11/10/2014 at 7:57 AM
Nov 6, 2014 at 5:04 PM
Hmm. It should be
webURL: "/vendors/vendoruniversity/events/",