Quantcast
Channel: Developing Apps for SharePoint 2013 forum
Viewing all articles
Browse latest Browse all 8089

Open a page in Modal Dialog from SharePoint hosted App or Auto Hosted App

$
0
0

function 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; }

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 App


Viewing all articles
Browse latest Browse all 8089

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>