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!

  • just a note showpopupdialog is an iframe :) – Ali Jafer Jun 10 '14 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)? – Stefan Bauer Jun 10 '14 at 9:37
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

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

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.