Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

How to show SP Dialog box on custom application page in Sharepoint 2013

$
0
0

I have an input(button) control on a custom application page.
I want to show a Sharepoint dialog box on onClick event of this input button by calling following javascript function:

   

function openForms(url,height,width,close) {
        options = SP.UI.$create_DialogOptions();
         options.width = width;
         options.height = height;
         options.url = url;
         options.allowMaximize = true;
         options.showClose= close;
         options.dialogReturnValueCallback = Function.createDelegate(1, CloseCallback);
         SP.UI.ModalDialog.showModalDialog(options);
        }
         function CloseCallback(result, target) {
         if (result == 1)
             location.reload(true);  
         }

This approach works fine in sharepoint 2010 but not working in sharepoint 2013.

If anyone knows how to do this I would very much appreciate it.

Thanks!



Viewing all articles
Browse latest Browse all 25064

Trending Articles



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