?
Solved

How to Disable Onclick event for SharePoint Month Calendar item?

Posted on 2010-11-15
1
Medium Priority
?
1,793 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

Independent Software Vendors: 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

Last week I faced a strange issue recently, i have deployed SharePoint 2003 servers for one project and one of the requirements was to open SharePoint site from same server. when i was trying to open site from the same server i was getting authentic…
SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

764 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