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

using SPServices in SP Foundation 2010 - Not working for me

Sep 1, 2010 at 8:12 AM

I tried using the below  in a SP Foundation site.I added this to a Content Editor Webpart
I can see the alert('hello'); work.
Any ideas what 'm doing wrong?
Thanks in Advance

<script src="../jQueryLibraries/jquery-1.4.2.min.js" type="text/javascript"></script>

<script src="../jQueryLibraries/jquery.SPServices-0.5.4.min.js" type="text/javascript"></script><script language="javascript" type="text/javascript">

$(document).ready(function() {
    operation: "GetListItems",
    async: false,
    listName: "Announcements",
    CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
    completefunc: function (xData, Status) {
      $(xData.responseXML).find("[nodeName=z:row]").each(function() {
        var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>";
});</script><ul id="tasksUL"></ul>

Sep 1, 2010 at 8:17 AM


What's happening? Are you getting an error? No results where you would expect some?


Sep 1, 2010 at 8:19 AM

Sorry sympmarc
the error i get is

"object doesn't support this property or method"

Sep 1, 2010 at 8:24 AM

I don't see anything obvious. The first thing I would check is that the reference to SPServices is valid.


Sep 1, 2010 at 8:34 AM

should i move the file jquery.SPServices-0.5.4.min.js from document lib to _layouts folder..
I'm sure its there as the jquery file is in the same document lib

Sep 1, 2010 at 8:37 AM
Edited Sep 1, 2010 at 8:37 AM

No, it can sit where it is. Debugging time!


Sep 1, 2010 at 8:45 AM

Marc how can i debug.
Have you tested it with SPF 2010.
Did it work.
I moved the files to the layouts folder with no luck.
I want to use SP services to create  TOP navigation so i want to pull data from a list and display it as menu.
Hope i will get there:(
Let me know i'll do some testing here too

Sep 1, 2010 at 8:58 AM

If you look through the docs, you'll see what I've explicitly tested with SP2010 by the use of the icons. I'm certain that GetListItems will work with SP2010.

If you're going to be using the Web Services like this, you're going to have to get used to debugging on your own. Use the Developer Tools in IE8 or Firebug with Firefox.


Sep 1, 2010 at 9:13 AM

is there anything i can add like alert('sdsd'); to test if the SPServices is working?
Can't remember but i think io read about Debug:true or something similar...


Sep 1, 2010 at 6:47 PM

Debug mode is only there for the "value-added" functions in SPServices.