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: ‘SPServices’ is null or not an object.
Make sure you reference the ‘base’ jquery first, then the services js file:
<script type=”text/javascript” src=”ICTLibrary/jquery.3.2.min.js”></script>
<script type=”text/javascript” src=”ICTLibrary/jquery.SPServices-0.5.4.min.js”></script>
<script language=”javascript” type=”text/javascript”>
var userName = “”;
$(document).ready(function()
{
alert(“ready”);
userName= $().SPServices.SPGetCurrentUser({
fieldName: “Title”
});
alert(userName);
});
</script>
AND make sure you close all tags and functions properly!!
Nice fill someone in on and this fill someone in on helped me alot in my college assignement. Thank you seeking your information.
Good post and this fill someone in on helped me alot in my college assignement. Thank you on your information.
Super site, and nice text.
Hey, I found your blog in a new directory of blogs. I dont know how your blog came up, must have been a typo, anyway cool blog, I bookmarked you.
I definitely loved this brilliant article. Please continue this awesome work.
Try removing the functionality from “(document).ready ”
It tries to run SPServices function before the JS is loaded in the browser and hence fails most of the times.
Hi Sumant,
Thanks for your comment, but the solution is already in the post.
Regards, Anita
I loved this brilliant article.
Hi
Thanks for the post: Make sure you reference the ‘base’ jquery first, then the services js file: this solved my problem.