Error: Object doesn't support this property or method

Dec 1, 2010 at 10:46 PM


function getType(selectObj) {

        // get the index of the selected option
            var idx = selectObj.selectedIndex;
         // get the value of the selected option
            var which = selectObj.options[idx].value;
       
    $().SPServices({
        operation: "GetListItems",
        webURL: "http://sagit-tl-spt-01:6933/sites/MySearch/_vti_bin/lists.asmx",
        listName: "Type",
        CAMLQuery: "<Query> \
           <OrderBy> \
              <FieldRef Name=\"Title\" /> \
           </OrderBy> \
           <Where> \
              <Eq> \
                 <FieldRef Name=\"Category\" /> \
                 <Value Type=\"Lookup\">Cat1</Value> \
              </Eq> \
           </Where> \
        </Query>",
        async: false,
        completefunc: function (xData, Status) {

            var select = $('#ddlType');

            $(xData.responseXML).find("z\\:row").each(function() {

                select.append("<option value='"+ $(this).attr("ows_Title") +"'>" + $(this).attr("ows_Title") + "</option>");

            });
        }
    });
}

 

above is my code, on $().SPServices the error is Object doesn't support this property or method, please help me how to getout of it.

 

Thanks,

Pruthvi

Coordinator
Dec 1, 2010 at 10:52 PM
Pruthvi: What this is telling you is that the reference to the SPServices .js file isn't right. Fix that and you'll probably be good to go. M.