basically this is my code

    function showLoadingDiv(){

        $('button').prop('disabled', true);
        console.log('ya paso')

I apply an spservice to save in sharepoint, and a webservice to save inside baasbox.

I can't get to show the loading div, or disable the button, but it does the procedure of saving the elements inside sharepoint and baasbox web service.

I think this is due to javascript being asynchronous but I cant find a way to succesfully show the loading while saving, and then hide the loading when finish.

  • Can you post showLoadingDiv() pls May 25, 2015 at 22:08

1 Answer 1


jQuery deferred object can solve your problem. https://learn.jquery.com/code-organization/deferreds/examples/

Using the above concept you can make the asynchronous calls work in synchronous way.

Let me know if you have more questions.


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.