1

I am new to Sharepoint developing/web development and I am trying to create a "loading..." box to occur until the page is finished. I want to use the Sharepoint modal dialog that is already available but I am not sure how to.

What I have:

<script type="text/javascript" src="_layouts/15/sp.runtime.js"></script>
<script type="text/javascript" src="_layouts/15/sp.js"></script>

<script type="text/javascript" src="_layouts/15/sp.ui.dialog.js"></script>
<script type="text/javascript" src="_layouts/15/ScriptResx.ashx?name=sp.res&culture=en-us"></script>
<script type="text/javascript" src="_layouts/15/sp.init.js"></script>

$(document).ready(function(){ 
ExecuteOrDelayUntilScriptLoaded(showWaitDialog(), "sp.js"); });

function showWaitDialog(){
if(waitDialog == null){
    waitDialog=SP.UI.ModalDialog.showWaitScreenWithNoClose("Processing...", "Please Wait...");
}

}

This gives me the "Processing..." modal box but produces errors in the console such as:

Uncaught TypeError: b is not a function
    at ExecuteOrDelayUntilEventNotified (init.js:1)
    at ExecuteOrDelayUntilScriptLoaded (init.js:1)
    at HTMLDocument.<anonymous> 

What am I missing?

Thanks!

Your Answer

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

Browse other questions tagged or ask your own question.