If somebody like the post and its helpful in your work then, add comments.

Friday, August 29, 2014

SharePoint 2013 : How to open and close SP.UI.ModalDialog.showWaitScreenWithNoClose

How to use SP.UI.ModalDialog.showWaitScreenWithNoClose to display custom loading message. Simplest way is that just write below code where you have to call the loader/model box of waiting

var value = SP.UI.ModalDialog.showWaitScreenWithNoClose(title, message, height, width);
and to close just add below code
value.close(0);
value=null;
 
There are lost of option are also available, which can be seen on 
http://msdn.microsoft.com/en-us/library/office/ff408140%28v=office.14%29.aspx
 
image

2 comments:

  1. Thanks!!! It's worked for me.
    var value = SP.UI.ModalDialog.showWaitScreenWithNoClose('Please wait....', 'Contract is generating', 100, 300);
    setTimeout(function() { value.close(0);window.location.reload();},8000);

    ReplyDelete