I have looked through quite a few posts and questions on the site here which suggest that I can insert code into a CEWP to open calendar items "Modally" instead of opening in a new page.

The issue that I am running into is that this is not working. I have tried to run it "as is" as well as downloading the script, creating a .js in SiteAssets and linking to it. I must be doing something incorrectly--read USER ERROR!

Additionally, since we are still using 2010, I am not sure that the code isn't for 2013. Can someone point me in the right direction or post the appropriate code to make this happen? I should really teach myself, but with so many resources, reinventing the wheel seems dumb. Thank you!


Please, try with this code:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
    // load our function to the delayed load list

    // hook into the existing SharePoint calendar load function.
    function calendarEventLinkIntercept() {
        if (SP.UI.ApplicationPages.CalendarNotify.$4a) {
            var OldCalendarNotify = SP.UI.ApplicationPages.CalendarNotify.$4a;
            SP.UI.ApplicationPages.CalendarNotify.$4a = function() {
        if (SP.UI.ApplicationPages.CalendarNotify.$4b) {
            var OldCalendarNotify = SP.UI.ApplicationPages.CalendarNotify.$4b;
            SP.UI.ApplicationPages.CalendarNotify.$4b = function() {

        // future service pack change may go here!
        // if (SP.UI.ApplicationPages.CalendarNotify.???)

    function bindEventClickHandler() {
        $('.ms-acal-mdiv a, .ms-acal-ddiv a, .ms-acal-sdiv a').click(function() {
            EditLink2(this, 'WPQ2');
            return false;
        $('a.ms-cal-nav').attr("href", "javascript:bindEventClickHandler(); void(0);");


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.