I ve tried above code so far but unable todo so may be due iframe and parent DOM restriction. Can someone please guide me in right direction on how to open a dialog or callout from an Appfunction Dialog() { hostweburl = decodeURIComponent( getQueryStringParameter('SPHostUrl') ); appweburl = decodeURIComponent( getQueryStringParameter('SPAppWebUrl') ); //alert(hostweburl); //alert(appweburl); var scriptbase = hostweburl + '/_layouts/15/'; $.getScript(scriptbase + 'SP.Runtime.js', function () { $.getScript(scriptbase + 'SP.js', function () { $.getScript(scriptbase + 'SP.RequestExecutor.js', ShowServerInformation); } ); } ); } function ShowServerInformation() { var options = { url: "/_layouts/Viewlsts.aspx&IsDlg=1", tite: 'Server Information', allowMaximize: false, showClose: true, width: 430, height: 230 }; parent.SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options); return false; }
↧
Open a page in Modal Dialog from SharePoint hosted App or Auto Hosted App
↧