GetAllSubWebCollection on SharePoint o365

May 8, 2013 at 4:11 PM
Edited May 8, 2013 at 6:15 PM
I tried to run below code at SharePoint online,
and I have full control over the site collection, but not the creator of the site collection.
$(document).ready(function() {
    $().SPServices({
        operation: "GetAllSubWebCollection",
        completefunc: function(xData, Status) {
            $(xData.responseXML).find("Webs > Web").each(function() {
                alert("called my SPservices");
                var $node = $(this);
                var Title = $node.attr("Title");
                var URL = $node.attr("Url");            
            });     

        }

    });     
}); 
But the alert never got run. However, when I ran above code over the site collection I created, it works fine.
Please help. Thanks a lot!
Coordinator
May 8, 2013 at 6:46 PM
Have you checked the script references to be sure they are good?

M.
May 8, 2013 at 7:12 PM
Thanks, Marc. Just compared two script libraries.
The working one has jQuery 1.7.2 whereas the other has jQuery 1.9.1.
Changed version to 1.7.2 , and now works fine.
Really loves the SPServices. Thanks you so much.
Hope to talk to you in person someday.
Coordinator
May 8, 2013 at 7:40 PM
As noted on the home page, jQuery 1.9.0 and 1.9.1 don't work with SPServices due to their bugs.

In person is always fun!

M.