I would like to show SP.UI.ModalDialog until I process and bind the data to data table. Can any one please do let me know what's wrong in it.

$(document).ready(function() {
    //alert("Hello World");
    var dialog = SP.UI.ModalDialog.showWaitScreenWithNoClose('Processing...', 'Request is in progress...' );
        dialog .close();

Try this,

    function RequestEnded() {
        try {
            waitDialog = null;
        } catch (ex) {}

    function RequestStarted() {
        ExecuteOrDelayUntilScriptLoaded(ShowWaitDialog, "sp.js");

    function ShowWaitDialog() {
        try {
            if (waitDialog == null) {
                waitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose('Processing...', 'Please wait while request is in progress...', 76, 330);
        } catch (ex) {}

    function BindTable() {
        //Logic to bind the table

Ref: Use showWaitScreenWithNoClose How to open or close SP.UI.ModalDialog.showWaitScreenWithNoClose

All the best!!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.