BlockUI – a whole web blocker

If we use AJAX to submit the form, sometime it takes time for server to respond to the AJAX request and in this period of time user might move around and click another action. Solution for this problem is; we block the whole web until the request is completed. There is one jQuery plugin for developers to be able doing this called jQuery BlockUI.

The package can be download right here:

http://malsup.com/jquery/block/

The implementation is pretty simple. All we need to include the javascript file and called its function anytime. As for AJAX form request, you can call the $.blockUI(); function before you made a request for example:

$.blockUI(); //start block UI
$.post('ajax-file-callback.php',data,function(data){
  $.unblockUI();
});

Leave a Reply

Your email address will not be published. Required fields are marked *