Solved

How to Disable Onclick event for SharePoint Month Calendar item?

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

687 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