display wait screen after Item is submitted.

  • 12 October 2017
  • 1 reply
  • 6 views

Badge +1

Hi,

I am starting a workflow which fetches user details from database , as soon as item is added. On save and submit button , I have added a JavaScript as follows :

function fetchOnClientClick()
{
Page_ClientValidate();
if(Page_IsValid)
{
setTimeout(SP.UI.ModalDialog.showWaitScreenWithNoClose('Working on it', 'Please wait, the appraisal is being started...'),10000);


return true;
}
else
{
return false;
}
}

I want to keep showing the "Please wait ..." screen for 10 seconds, but it seem to doesn't work. I referred the following post for JS.

https://community.nintex.com/message/18243?q=display%20wait%20screen%20after%20i


1 reply

Badge +7

Without having tested the code I would assume, that the dialog is opening after 10 seconds instead of being closed in 10 seconds - at best.

I would try something like this:

function fetchOnClientClick()
{
     Page_ClientValidate();
     if(Page_IsValid)
     {
          SP.UI.ModalDialog.showWaitScreenWithNoClose('Working on it', 'Please wait, the appraisal is being started...');
          setTimeout(function() {
               SP.UI.ModalDialog.close(SP.UI.DialogResult.OK);
          }, 10000);

          return true;
     }
     else
     {
          return false;
     }
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Reply