Can someone help me with this script :)

May 1, 2012 at 7:30 AM

Hi All,
    Can someone help me why i can't print out the title.
I can see the output when i print it out to the screen using :



See below;


 listSiteURL = 'http://myserver/sites/Intranet/';

   operation: "GetListItems",
   webURL: listSiteURL,
   async: false,
   listName: "QuickLaunch",
   CAMLQuery: "<Query/>",
   CAMLViewFields: "<ViewFields><FieldRef Name='URL'/></ViewFields>",
      completefunc: function (xData, Status) {

      $(xData.responseXML).find("[nodeName=z:row]").each(function() {
        var title = $(this).attr("ows_URL");



Thanks in Advance


May 1, 2012 at 12:19 PM

If you're not getting the title alert, then my guess is that you are using jQuery 1.7+. If so, the .find("[nodeName=z:row]") selector won't work; use SPFilterNode instead. See Important Notes on the home page.


May 1, 2012 at 12:43 PM

The solution really depends on the version of jQuery & SPServices you are using.  I believe 1.5+ the jQuery team started to enforce the "quote" rule.

Here's an example, notice the single quotes that surround z:row.

      $(xData.responseXML).find("[nodeName='z:row']").each(function() {
        var title = $(this).attr("ows_URL");

I'm thinking that's all you have to do to fix your code, but if that doesn't work, you'll need to post more information about the version of jQuery/SPServices you are using.




May 2, 2012 at 12:27 AM

Will check the quotes out.
The versions 'm using is:




May 2, 2012 at 12:41 AM

thanks guys very much it was the quote :(
I have been using SPServices alot as i'm addicted to it :) no ideas how i missed that must have copied it from an old source.

May 2, 2012 at 12:28 PM

You should consider upgrading though.  Marc has made significant improvements in the latest release.  It's nothing but awesomesauce...