SharePoint 2010 Modal Dialog Pop up
Modal Dialogs in SharePoint 2010 use the client library SP.UI.ModalDialog and ShowPopupDialog. We can open Dialog without leaving the page by writing simple html markup and by calling some SP.UI.ModalDialog API’s. Most simplest and an easy way to create SharePoint Modal Dialog is, calling JavaScript function and pass only URL parameter. <a href=”javascript:SP.UI.ModalDialog.ShowPopupDialog(‘/_layouts/viewlsts.aspx?isDlg=1′);” > View All Contents < /a> isDlg=1 Optional You can simply add “&IsDlg=1″ to any SharePoint URL and the chrome will be turned off. There are some parameters specially setting the width and the height of the window and a null parameter for call back function. which for now is set to null. We can create Dialog with specified hight and width like, < a href=”javascript:SP.UI.ModalDialog.ShowPopupDialog(‘/_layouts/viewlsts.aspx?isDlg=1′, null, 500, 300);” > View All Contents...