0

I have a SharePoint calendar, and I've got some Javascript code to force a calendar overlay event to open in a modal dialog. Basically, it forces them to open in a modal dialog via this code:

$('.ms-acal-ddiv a').click(function(){EditLink2(this,'WPQ2');return false;});

The problem is that there are already "native" events on the calendar which open with this code, and what is happening is that when you click on it, the events open TWICE with a modal dialog, thus rendering the page unusable.

I'm not savvy with writing jquery or javascript. How can I write the javascript to look for that code that's bolded, and prevent it from running if the link already executes with that?

Thanks for the help in advance.

1 Answer 1

0

I wrote a blog post about this issue, you can use JQuery event called event.preventDefault() method to stop the default action of the event and that way you can use your own functionality when the event fires.

Take a look at my post.

Hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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