Skip to main content
replaced http://sharepoint.stackexchange.com/ with https://sharepoint.stackexchange.com/
Source Link

try this code..

function ShowModal() {
    ExecuteOrDelayUntilScriptLoaded(function () {
        var options = {
            url: 'servername/webpart.aspx',
            tite: 'Add Vendor',
            width: 800,
            height: 475,
            allowMaximize: true,
            showClose: true,
            dialogReturnValueCallback: scallback
        };
        SP.UI.ModalDialog.showModalDialog(options);
    }, 'sp.js');
 }

 function scallback(dialogResult, returnValue) {
      if (dialogResult == SP.UI.DialogResult.OK) {
           SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK);
      }

Source : SP.UI.ModalDialog.RefreshPage from the dialog itself?SP.UI.ModalDialog.RefreshPage from the dialog itself?

try this code..

function ShowModal() {
    ExecuteOrDelayUntilScriptLoaded(function () {
        var options = {
            url: 'servername/webpart.aspx',
            tite: 'Add Vendor',
            width: 800,
            height: 475,
            allowMaximize: true,
            showClose: true,
            dialogReturnValueCallback: scallback
        };
        SP.UI.ModalDialog.showModalDialog(options);
    }, 'sp.js');
 }

 function scallback(dialogResult, returnValue) {
      if (dialogResult == SP.UI.DialogResult.OK) {
           SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK);
      }

Source : SP.UI.ModalDialog.RefreshPage from the dialog itself?

try this code..

function ShowModal() {
    ExecuteOrDelayUntilScriptLoaded(function () {
        var options = {
            url: 'servername/webpart.aspx',
            tite: 'Add Vendor',
            width: 800,
            height: 475,
            allowMaximize: true,
            showClose: true,
            dialogReturnValueCallback: scallback
        };
        SP.UI.ModalDialog.showModalDialog(options);
    }, 'sp.js');
 }

 function scallback(dialogResult, returnValue) {
      if (dialogResult == SP.UI.DialogResult.OK) {
           SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK);
      }

Source : SP.UI.ModalDialog.RefreshPage from the dialog itself?

Source Link
Pushpendra
  • 1.4k
  • 9
  • 16

try this code..

function ShowModal() {
    ExecuteOrDelayUntilScriptLoaded(function () {
        var options = {
            url: 'servername/webpart.aspx',
            tite: 'Add Vendor',
            width: 800,
            height: 475,
            allowMaximize: true,
            showClose: true,
            dialogReturnValueCallback: scallback
        };
        SP.UI.ModalDialog.showModalDialog(options);
    }, 'sp.js');
 }

 function scallback(dialogResult, returnValue) {
      if (dialogResult == SP.UI.DialogResult.OK) {
           SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK);
      }

Source : SP.UI.ModalDialog.RefreshPage from the dialog itself?