Wait dialog in SharePoint 2013 with JavaScript

Some actions in SharePoint (e.g. executing querys) can take a while. You want the user to not do any action or even change the data while your process is running. So you need the wait dialog that SharePoint is displaying some time.
Calling the dialog is pretty easy. All you need is a line of code.


You can use the ModalDialog class of SharePoint. It has a wait screen function where you can enter your own textes and size. The waiting circle will be added automatically.

1
2
3
var WaitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose("Working on it..", "Please wait a moment", 150, 330);
// some code that needs time
WaitDialog.close();

Comments

Popular posts from this blog

How to support multiple languages in WPF