Solved

How to Disable Onclick event for SharePoint Month Calendar item?

Posted on 2010-11-15
1
1,685 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
When using a search centre, I'm going to show you how to configure Sharepoint's search to only return results from the current site collection. Very useful when using Office 365 with multiple site collections.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

739 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