async: false ?

async: false ?

Postby israelwebdev » Thu Aug 03, 2017 10:33 pm

Any reason why a majority of the $.ajax calls use async: false ?

Any harm in turning on async?

The UI can be blocked using an approach like this:
https://stackoverflow.com/questions/1964839/how-can-i-create-a-please-wait-loading-animation-using-jquery
but not for all ajax calls. Supplement the nuBuildForm function for example in nucommon.js
with
Code: Select all
            window.loading = true;
         $('body').addClass("loading");

and
Code: Select all
.always(function(data){
            window.loading = false;
            $('body').removeClass("loading");
})
israelwebdev
 
Posts: 21
Joined: Fri May 23, 2014 1:38 am

Return to General