Posts

Showing posts from February, 2018

Hide Ribbon from SharePoint List Display form

Image
How to hide Ribbon from SharePoint List’s Display form Each of the SharePoint List has three form by default: 1.DisplayForm.aspx 2.EditForm.aspx 3.NewForm.aspx To check this Open List in SharePoint Designer and Under Form section we have three default forms as below: In my scenario i will hide SharePoint ribbon from DisplayForm.aspx, to implement this i will Open DisplayForm.aspx in SharePoint Designer and paste the code to hide ribbon. Code:     <script type="text/javascript">         document.getElementById("s4-ribbonrow").style.display = "none";     </script> Output:

Open SharePoint 2013 Calendar Event in Modal Dialog

Image
How to Open SharePoint 2013 Calendar Event in Modal Dialog Step 1: Create a SharePoint Calendar list and Add an event there as below. Step 2: Edit list, add Script Editor Web Part to it and paste the below code. Code: <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js"></script> <script type="text/javascript">     $(document).ready(function () {         setInterval(function () {             $("a[href*='DispForm.aspx']").each(function () {                 $(this).attr("onclick", "openDialog('" + $(this).text() + "','" + $(this).attr("href") + "')");                 $(this).attr("href", "javascript:void(0)");                 $(this).removeAttr("target");             });   ...