{"id":947,"date":"2017-11-03T12:01:10","date_gmt":"2017-11-03T06:31:10","guid":{"rendered":"https:\/\/blog.binarybits.net\/?p=947"},"modified":"2017-11-03T12:01:10","modified_gmt":"2017-11-03T06:31:10","slug":"displaying-sharepoints-please-wait-or-working-on-it-dialog-box","status":"publish","type":"post","link":"https:\/\/blog.binarybits.net\/displaying-sharepoints-please-wait-or-working-on-it-dialog-box\/","title":{"rendered":"Displaying SharePoint’s “Please wait…” or “Working on it…” dialog box"},"content":{"rendered":"
The following code helps in displaying the “Working on it…” dialog box available in SharePoint 2013 or SharePoint Online.<\/p>\n
Before you being the background operation, call the function “RequestStarted<\/em>“. Once the background operation has been completed, call the function “RequestEnded<\/em>“.<\/p>\nfunction RequestEnded(sender, args) {\r\n try {\r\n waitDialog.close();\r\n waitDialog = null;\r\n } catch (ex) {}\r\n};\r\n\r\nfunction RequestStarted(sender, args) {\r\n var waitDialog;\r\n ExecuteOrDelayUntilScriptLoaded(ShowWaitDialog, \"sp.js\");\r\n};\r\n\r\nfunction ShowWaitDialog() {\r\n try {\r\n if (waitDialog == null) {\r\n waitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose('Processing...', 'Please wait while request is in progress...', 120, 440);\r\n }\r\n } catch (ex) {}\r\n};<\/pre>\n