Solved

How to Disable Onclick event for SharePoint Month Calendar item?

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now