SPServices is Null or Not an Object - Sharepoint 2010

Apr 18, 2011 at 6:04 PM
This is what I am trying to do:  Prepopulate the current user in a People Picker.  Not sure it matters here, but here are some details:
  1. Very simple list - just two fields
  2. People picker is called "Assigned to"

When I throw the code below into a CEWP (or directly on the page), I am getting the "SPServices is Null or Not an Object error.  Any help would be greatly appreciated!

<script language="javascript" type="text/javascript" src="/SiteAssets/jquery-1.5.1.min.js"></script>
<script language="javascript" type="text/javascript" src="/SiteAssets/jquery.SPServices-0.6.1.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
 var userName = $().SPServices.SPGetCurrentUser({
  fieldName: "Name"
 });
 $("textarea[title='People Picker']").val(userName);
 $("div[title='People Picker']").text(userName);
});
</script>
Apr 18, 2011 at 6:07 PM

Nevermind, I figured this out.  There was another 3rd part web part on the page interfering with the code.

Coordinator
Apr 18, 2011 at 6:23 PM
Edited Apr 18, 2011 at 6:24 PM

Awesome!