Showing posts with label Jquery. Show all posts
Showing posts with label Jquery. Show all posts

Wednesday, March 17, 2021

17 Mar

How to check whether the current user has edit permission for a particular list using JSOM in SharePoint 2013

 we first need to get the login name of user and pass it to the get_effectiveBasePermissions method.To ensure that user has edit permission, we will check the SP.PermissionKind.editListItems enum.SP.SOD.executeFunc('sp.js', 'SP.ClientContext', function () {    getCurrentUserPermission();});function getCurrentUserPermission(){ ...

Friday, July 24, 2020

24 Jul

JavaScript : How to Convert UTC Date Time to local/EST Hours using JavaScript?

In this below script, Convert UTC Date Time to local/EST Hours In this article , we will use default java-script action Type 1: var localTime = new Date(); var localKolkata = moment.tz(localTime, "Asia/Kolkata").format("hh:mm:ss"); Javascript script provide date and time format. Type 2: function getLocalTime(i)...

Monday, June 20, 2016

20 Jun

How to get Auto populate dropdown in SharePoint List using SPServices?

In this below script, Auto populate dropdown in SharePoint List using SPServices <input type="text" id="txtsearch" onkeyup="binddetails()"> Code: function binddetails() { availableTags = [];   $().SPServices({             operation: "GetListItems",        ...

Thursday, May 12, 2016

12 May

How to get all the td values of a Table in a JavaScript function?

In this below script, get all the td values of a Table in a JavaScript Script: $("#tblemp tbody tr").each(function() {             alert($(this).find("td:last-child").html());     }); HTML: <table id="tblemp" class="display" cellspacing="0" width="100%">    ...

Tuesday, April 26, 2016

26 Apr

Item Adding / Item Added Event Receiver for Document Library

In this below script, Item Adding / Item Added Event Receiver Ways to retrieve data are: Properties.ListItem[«FieldName »] Properties.AfterProperties[«FieldName »] Properties.BeforeProperties[«FieldName »] we must add the synchronization parameter  to our xml definition. <Receiver> <Name>EventReceiver1ItemAdded</Name> <Type>ItemAdded</Type> <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly> <Class>TutoTaxonomy.EventReceiver1.EventReceiver1</Class> <SequenceNumber>10000</SequenceNumber> <Synchronization>Synchronous</Synchronization> </Receiver> In...