Hi all,
Could you point me to any documentation about using spservices in SharePoint Online?
My specific question (apologies if this is already posted elsewhere) is the proper way to use the library in this environment. So far, I have done the following:
Could you point me to any documentation about using spservices in SharePoint Online?
My specific question (apologies if this is already posted elsewhere) is the proper way to use the library in this environment. So far, I have done the following:
- Added jquery-1.10.2.min.js and jquery.SPServices-2013.01.min.js to a document library.
-
Using a Script Editor web part I am performing a simple test.
<div style="background-color:#a80000;color:#fff;" id="currentUserDIV">Your name is: </div>
<script>
function goGetCurrentUserForTasks() {
userName = $().SPServices.SPGetCurrentUser({
fieldName: "Title"
});
// Add Username to tasks
$("#currentUserDIV").append(userName);
}
goGetCurrentUserForTasks() ;
</script>
-
It works just fine, while in edit mode. However, when I save/publish the page the spservices call (the username in this case) disappears.