Hi @vrm ,
You can refer to following code to show wait message while dialog loading
function openDialog(pageUrl) {
var options = {
url: pageUrl,
allowMaximize: false,
showClose: true
};
SP.UI.ModalDialog.showModalDialog(options);
showWait();
}
var waitDialog = null;
function showWait() {
ExecuteOrDelayUntilScriptLoaded(function() {
waitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose(SP.Res.dialogLoading15);
// DO SOMETHING;
DoSomeWorkUsingAjax(myCallBack)
}, sp.js);
}
function myCallBack() {
if (!fIsNullOrUndefined(waitDialog)) {
waitDialog.close(SP.UI.DialogResult.OK);
//or SP.UI.ModalDialog.close();
}
}
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.