0


Just a quick question, so I have the below link to open a page in the Model Dialog for another page, instead of an iFrame. My question is, is it possible to open the modal dialog in full screen?

<a href="javascript:SP.UI.ModalDialog.ShowPopupDialog("#";);">Text to Link</a>


Thanks!

2
  • just a note showpopupdialog is an iframe :)
    – Ali Jafer
    Jun 10, 2014 at 6:55
  • Can you please define full screen do you like to fill the page in the browser or do you really mean full screen as you get when you press F11 (Kiosk Mode)? Jun 10, 2014 at 9:37

1 Answer 1

2

Use the following code to open model dialog in full screen:

<script type="text/javascript" >
function openDialog(strPageURL) {
var options = {
url: strPageURL,
showMaximized: true,
width: 800,
height: 500,
title: "Title of Dialog" };
SP.UI.ModalDialog.showModalDialog(options);
}
</script>

<a onclick='javascript:openDialog("/server/teamsite/document.pdf");javascript:return false;' href="#" target=_self> Click to Open</a>  

Also refer the following links for more options:

http://sharepoint2020.wordpress.com/2013/02/15/how-to-open-a-pop-up-dialog-maximized-fullscreen/

http://dotnetfollower.com/wordpress/2012/07/sharepoint-how-to-maximize-a-modal-dialog-window/

http://msdn.microsoft.com/en-us/library/office/ff410058(v=office.14).aspx

1
  • showMaximized: true option. @Aanchal +1 for answering with complete example May 9, 2019 at 19:19

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.