0

My calendar uses calendar overlay. I am trying to get the event information to pop up on the same page. Currently the event information opens a new tab, I am not too familiar with the javascript options and am looking for any alternative.

Thank you!

0

Please following steps:

1.Edit the Calendar view page.

enter image description here

2.Add the Script Editor web part.

enter image description here

3.Paste the below script:

<script src="https://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
setInterval(function () {
$("a[href*='DispForm.aspx']").each(function () {
$(this).attr("onclick", "openDialog('" + $(this).text() + "','" + $(this).attr("href") + "')");
$(this).attr("href", "javascript:void(0)");
$(this).removeAttr("target");
});
}, 900);
});
 
function openDialog(title, url) {
var options = {
title: "Calendar - " + title,
 
autoSize:true,
url: url
};
SP.UI.ModalDialog.showModalDialog(options);
}
</script>

enter image description here

1
  • Hi, thank you for this. But I tried to put this in and it did not do anything. Am I missing something? – VirtualGirl7 yesterday

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.