{"id":78,"date":"2010-05-11T16:41:26","date_gmt":"2010-05-11T14:41:26","guid":{"rendered":"http:\/\/www.itidea.nl\/wordpress\/?p=78"},"modified":"2015-09-08T20:32:29","modified_gmt":"2015-09-08T18:32:29","slug":"jquery-spservices-is-null-or-not-an-object","status":"publish","type":"post","link":"https:\/\/www.itidea.nl\/index.php\/jquery-spservices-is-null-or-not-an-object\/","title":{"rendered":"jQuery SPServices is null or not an object"},"content":{"rendered":"<p>Accessing a SharePoint list with the jQuery SPServices is very cool and neat! But I just discovered an issue with it:<\/p>\n<p>Sometimes you get a message: &#8216;SPServices&#8217; is null or not an object.<\/p>\n<p>Make sure you reference the &#8216;base&#8217; jquery first, then the services js file:<br \/>\n&lt;script type=&#8221;text\/javascript&#8221; src=&#8221;ICTLibrary\/jquery.3.2.min.js&#8221;&gt;&lt;\/script&gt;<br \/>\n&lt;script type=&#8221;text\/javascript&#8221; src=&#8221;ICTLibrary\/jquery.SPServices-0.5.4.min.js&#8221;&gt;&lt;\/script&gt;<\/p>\n<p>&lt;script language=&#8221;javascript&#8221; type=&#8221;text\/javascript&#8221;&gt;<br \/>\n\u00a0var userName = &#8220;&#8221;;<\/p>\n<p>$(document).ready(function()<br \/>\n{<br \/>\n\u00a0alert(&#8220;ready&#8221;);<br \/>\n\u00a0userName= $().SPServices.SPGetCurrentUser({<br \/>\n\u00a0 fieldName: &#8220;Title&#8221;<br \/>\n\u00a0});<\/p>\n<p>alert(userName);<br \/>\n\u00a0});<\/p>\n<p>&lt;\/script&gt;<\/p>\n<p>AND make sure you close all tags and functions properly!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Accessing a SharePoint list with the jQuery SPServices is very cool and neat! But I just discovered an issue with it: Sometimes you get a message: &#8216;SPServices&#8217; is null or not an object. Make sure you reference the &#8216;base&#8217; jquery &#8230; <a class=\"more-link\" href=\"https:\/\/www.itidea.nl\/index.php\/jquery-spservices-is-null-or-not-an-object\/\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,8],"tags":[11,33],"class_list":["post-78","post","type-post","status-publish","format-standard","hentry","category-sharepoint-2007","category-sharepoint-2010","tag-jquery","tag-spservices"],"_links":{"self":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts\/78","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/comments?post=78"}],"version-history":[{"count":10,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts\/78\/revisions"}],"predecessor-version":[{"id":758,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts\/78\/revisions\/758"}],"wp:attachment":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/media?parent=78"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/categories?post=78"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/tags?post=78"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}