I’m using SPServices and cannot figure out why I keep getting this error thrown from the jQuery library that b.toLowercase is not a function. Here are complete details of the error:
jquery-1.11.3.min.js:2 Uncaught TypeError: b.toLowerCase is not a function at Function.ga.attr (jquery-1.11.3.min.js:2) at attr (jquery-1.11.3.min.js:5) at m.access (jquery-1.11.3.min.js:4) at m.fn.init.attr (jquery-1.11.3.min.js:5) at Element.<anonymous> (https://STandardization_copy(1).aspx:732:16) at Function.each (jquery-1.11.3.min.js:2) at m.fn.init.each (jquery-1.11.3.min.js:2) at Object.completefunc (https://STandardization_copy(1).aspx:731:46) at Object.complete (jquery.SPServices-2014.02.min.js:19) at j (jquery-1.11.3.min.js:2) ga.attr @ jquery-1.11.3.min.js:2 attr @ jquery-1.11.3.min.js:5 m.access @ jquery-1.11.3.min.js:4 attr @ jquery-1.11.3.min.js:5 (anonymous) @ PMSTandardization_copy(1).aspx:732 each @ jquery-1.11.3.min.js:2 each @ jquery-1.11.3.min.js:2 completefunc @ PMSTandardization_copy(1).aspx:731 complete @ jquery.SPServices-2014.02.min.js:19 j @ jquery-1.11.3.min.js:2 fireWith @ jquery-1.11.3.min.js:2 x @ jquery-1.11.3.min.js:5 b @ jquery-1.11.3.min.js:5 send @ jquery-1.11.3.min.js:5 ajax @ jquery-1.11.3.min.js:5 ao.fn.SPServices @ jquery.SPServices-2014.02.min.js:19 (anonymous) @ STandardization_copy(1).aspx:724 j @ jquery-1.11.3.min.js:2 fireWith @ jquery-1.11.3.min.js:2 ready @ jquery-1.11.3.min.js:2 J @ jquery-1.11.3.min.js:2
Here is my code. I’m using a CEWP that links to an html file containing all of the code:
$ ().SPServices({ operation: "GetListItems", async: false, CAMLViewFields: "<ViewFields><FieldRef Name='ID' /><FieldRef Name='docLink' /></ViewFields>", listName: "PM", debug: true, completefunc: function (xData, Status) { $ (xData.responseXML).SPFilterNode("z:row").each(function(){ if ($ (this).attr("docLink" === 2)){ setTimeout(function(){ location.relod(true); },3000); } }); } });