Quantcast
Channel: SharePoint 2013 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 26374

JavaScript. Analog of SP.UI.ModalDialog.showModalDialog function, but render to specific div not to pop-up

$
0
0

How to make the analog of SP.UI.ModalDialog.showModalDialog function, but render to specific div?

I need to render EditForm to div on page and set callback function. Something like SP.UI.ModalDialog.showModalDialog but show EditForm in specific div, not in pop-up.

var ShowForm = function () {
    var options = {};
    options.url = 'mywebUrl/Lists/myList/EditForm.aspx?ID=1';
    options.dialogReturnValueCallback =
                function (dialogResult, returnValue) {
                    console.log({ dialogResult: dialogResult, returnValue: returnValue });
                }

    // render form to popup div
    SP.UI.ModalDialog.showModalDialog(options);


    // needed something like this
    SP.UI.ModalDialog.showInSpecificDiv(options, 'divId');
}



Viewing all articles
Browse latest Browse all 26374

Trending Articles



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