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

Conflicting jQuery no longer recognises SPServices

May 29, 2014 at 8:12 PM

I've written code which is building html based on a list and library in O365. In my own environment it works fine. When testing on the client site $().SPServices({ line returns the error Object doesn't support property of method 'SPServices'

Looking in the sources JQuery is being loaded twice, if I remove the reference I've added to jQuery I get SPServices claiming jQuery hasn't been loaded.

The versions of jQuery being loaded are 1.10.1 and 1.10.2. I'm loading 2014.01 SPServices.

The code is
//Global variables
var guideHtml="";
var chapHtmlUL="";
var chapHtmlBut="";

//Get from GuideList all guide rows
function getGuides(){
    //Web service we are calling
    var method = "GetListItems";

    //List contain nav details (use display name)
    var list = "GuideList";

    //details of fields to be used (use internal names)
    var fieldsToRead =  "<ViewFields>" +
                            "<FieldRef Name='Title' />" +
                            "<FieldRef Name='GuideImageURL' />" +
                            "<FieldRef Name='GuideNumber' />" +
                            "<FieldRef Name='GuideSupportURL' />" +
                            "<FieldRef Name='GuideURL' />" +
                            "<FieldRef Name='GuideWhat' />" +
                            "<FieldRef Name='GuideWho' />" +

    //CAML query to filter and sort the data by GuideNumber
    var query = "<Query>" +
                    "<Where>" +
                        "<Neq>" +
                            "<FieldRef Name='ID'/><Value Type='Number'>0</Value>" +
                        "</Neq>" +
                    "</Where>" +
                    "<OrderBy>" +
                        "<FieldRef Name='GuideNumber' />" +
                    "</OrderBy>" +
    //SPServices call to get the data
        operation: method,
        async: false,
        listName: list,
        CAMLViewFields: fieldsToRead,
        CAMLQuery: query,
        completefunc:function(xData, Status){
            $(xData.responseXML).SPFilterNode("z:row").each(function() {
                //Populate variables with field values
                var guideTitle = ($(this).attr("ows_Title"));
                var guideNumber = ($(this).attr("ows_GuideNumber"));
                var guideImageURL = ($(this).attr("ows_GuideImageURL")).split(",")[0];
                var guideImageALT = ($(this).attr("ows_GuideImageURL")).split(",")[1];
                var guideWhat = ($(this).attr("ows_GuideWhat"));
                var guideWho = ($(this).attr("ows_GuideWho"));
                var guideComplete = ($(this).attr("ows_GuideURL")).split(",")[0];
                var guideSupport = ($(this).attr("ows_GuideSupportURL")).split(",")[0];
Any ideas?


Laura GB
May 30, 2014 at 3:58 AM

You should track own where the other version of jQuery is coming from. Either 1.10.1 and 1.10.2 should be fine.

If you're getting "Object doesn't support property of method 'SPServices'", then it's SPServices that's not loading.

May 30, 2014 at 7:54 AM
Thanks for your fast reply Marc.

I'm going to investigate the other version of jQuery being loaded. SPServices and see how I get on.

Laura GB