Posts

Showing posts from June, 2018

User Profile Properties in SharePoint 2013 using REST api

Image
How to get User Profile Properties in SharePoint 2013 using REST api and jQuery Code: $(document).ready(function() {       user_Properties();    }); function user_Properties(){  $.ajax({                  url: _spPageContextInfo.webAbsoluteUrl + "/_api/SP.UserProfiles.PeopleManager/GetMyProperties",               headers: { Accept: "application/json;odata=verbose" },               success: function (data) {                           console.log(data);                        },               error: function (jQxhr, errorCode, errorThrown) {                   alert(errorThrown);               }           });      }

Loader in SharePoint forms using jQuery

Image
How to implement Loader in SharePoint forms using jQuery HTML:- <div id="ProcessingGifAjax" >     <img src="../Style%20Library/Images/ajax-loader.gif" alt="processing" />     <b>Processing...</b><br />     (please wait) </div> <style type="text/css"> #overlay {         background: rgba(0, 0, 0, 0.5) none repeat scroll 0 0;         height: 100%;         position: fixed;         width: 100%;         z-index: 1;     }     #ProcessingGifAjax {         background: #ffffff none repeat scroll 0 0;         border: 3px solid #50570b;         border-radius: 15px;         color: #5d6c8c;               font-family: Arial,Helvetica,sans;         font-size: 1em;         height: 90px;         left: 50%;         margin: 5px 5px 5px -50px;         padding: 5px;         position: fixed;         text-align: center;         top: 200px;         width: 100px;         z-index: 9000;  

Enable and Disable Client side People Picker using jQuery

Image
How to enable and disable Client side People Picker using jQuery By using below methods you can easily enable or disable Client side People Picker:- function disablePP() { $(".sp-peoplepicker-delImage").find("span").css("display","none"); $("input.sp-peoplepicker-editorInput[title='Enter names or email addresses...']").prop('disabled', true); $("div.sp-peoplepicker-topLevel[title='Enter names or email addresses...']").addClass("sp-peoplepicker-topLevelDisabled"); } function enablePP() { $("div.sp-peoplepicker-topLevel[title='Enter names or email addresses...']").removeClass("sp-peoplepicker-topLevelDisabled"); $("input.sp-peoplepicker-editorInput[title='Enter names or email addresses...']").prop('disabled', false); $(".sp-peoplepicker-delImage").find("span").removeAttr('style'); }