Solved

How to Disable Onclick event for SharePoint Month Calendar item?

Posted on 2010-11-15
1
1,652 Views
Last Modified: 2012-05-10

How to Disable Onclick event for SharePoint Month Calendar item? using java script or CSS ...

Thanks,
Venkateswara Rao P
0
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 13

Accepted Solution

by:
PillalamarriVenkateswaraRao earned 0 total points
ID: 34144157
Got the solution. By using below lines of code ...

Anybody wants clear idea on this please see the below url.

http://www.sharepointdev.net/sharepoint--design-customization/calendar-view-edit-item-links-1757.shtml

Thanks,
Rao.


<script>

function DisableLinks()
{
 var x = document.getElementsByTagName("A");
 for (var i=0;i<x.length;i++)
 {
  if (x[i].href.indexOf("DispForm.aspx")>-1)
  {
    x[i].onclick = function () {return false};
    x[i].href="javascript:return false";
    if (x[i].parentNode.href) 
    {
      x[i].parentNode.onclick = function () {return false};
      x[i].parentNode.href="javascript:return false";
    }
  }
 }
}

// add our function to the SharePoint OnLoad event
_spBodyOnLoadFunctionNames.push("DisableLinks"); 

</script>

Open in new window

0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question