How to create Sharepoint 2010 Modal Dialog Pop up ( Popup with Faded Background )
Many a times we have a requirement like we need to open a Pop-up with the Faded Background.
Sharepoint 2010 has provided us a very simple way to achieve this.
Sharepoint 2010 has provided us a very simple way to achieve this.
Below is the JavaScript with the help of which we can open a Modal Dailog Pop Up of Sharepoint 2010.
<script type="text/javascript">
function OpenDialog(URL) {
var NewPopUp = SP.UI.$create_DialogOptions();
NewPopUp.url = URL;
NewPopUp.width = 700;
NewPopUp.height = 350;
SP.UI.ModalDialog.showModalDialog(NewPopUp);
}
</script>
Call the Javascript on Button click and the modal PopUp will pops up
with the Page of Specified URL.
with the Page of Specified URL.
btnOpenPopUp.Attributes.Add("onClick", "javascript:OpenDialog(‘/_layouts/MyAppPage/MyPage.aspx’);");
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRIX8TidHTEmszyiIZp3ze3DfnAY6MTNQnBOdJ14gBbLD319E6X3vGwg_ZVlsv-bhgPevOua647LVQ03ThzIUKgFn92dmq9If_0xGDTWUjIdix25n5bre_TLIUzOlEWGBZ2Wq2tdF-yjM/s320/PopUp.png)
No comments:
Post a Comment