I'm loading a modal dialog on a web part. Sometimes it takes a lot of time to load, like 6/7 secs. Here's the code:
function Init(title, id) {
var dialogOptions = SP.UI.$create_DialogOptions();
dialogOptions.url = '/_layouts/MyWebPart/MyModalDialog.aspx?id='+id;
dialogOptions.title = "My Modal Dialog";
dialogOptions.width = 660;
dialogOptions.height = 400;
dialogOptions.dialogReturnValueCallback = function (res, retVal) {
if (res === SP.UI.DialogResult.OK) {
RTEActions(retVal);
}
};
SP.UI.ModalDialog.showModalDialog(dialogOptions);
return false;
}
Is there any way to show a message or a loading effect while MyModalDialog.aspx is not fully loaded?