0

I'm using SharePoint Online

I found this link on how to open a hyperlink in Modal -- but how do I apply it in my tag? clicking the link doesn't do anything.

<script>
function openModelDialogPopup(strPageURL) {  
var dialogOptions = {  
url: ‘https://tenant.sharepoint.com/Lists/ListName/item/newifs.aspx’,  
title: ‘ModalDialog’,  
allowMaximize: false,  
showClose: true,  
width: 800,  
height: 330  
};  
SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', dialogOptions);  
return false;  
}   

</script>
<a href="#" onclick="openModelDialogPopup">CALL-IN</a>
2
  • try openModeDialogPopup() and remove the strPageURL in line 2
    – Mike
    Nov 3, 2017 at 20:10
  • @Mike - I tried and still does nothing. Nov 3, 2017 at 20:17

1 Answer 1

1

Try doing this:

replace your while <script> block with this

<script type="text/javascript">function openModeDialogPopup() { 
SP.UI.ModalDialog.showModalDialog({ 
url: "https://tenant.sharepoint.com/Lists/ListName/item/newifs.aspx", 
title: "ModalDialog", 
allowMaximize: false, 
showClose: true,
width: 800,  
height: 330  
}); 
}; 

</script>
0

Your Answer

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

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