I use a modal dialog to display my custom aspx page. However, the page takes some time to load, and I would like to provide custom loading message while the modal dialog is loading. I found out here I can do this with
SP.UI.ModalDialog.showWaitScreenWithNoClose, but how exactly do I use it? Where and how am I supposed to put it to display custom loading message prior to showing the modal dialog?
This is how I open a modal dialog (on button click):
Where in this code does
SP.UI.ModalDialog.showWaitScreenWithNoClose fit and how? I'd like it to automatically close after the page in modal dialog has been loaded.