Block UI

Block UI

Hi, 

I have the following, although the screen locks it does not seem to show the image, is there something I am missing.

Also:

1. Is it possible to hook in to the DOM busy processing, such as scrolling a nested treeview?

2. Is it possible to add a delay prior to unlocking?


  1. $.extend({
              initializeUiBlocking: function () {
                  if (typeof ($.blockUI) != 'undefined') {
                      $.blockUI.defaults.css = { border: 'none', backgroundColor: 'transparent' }
                      $.blockUI.defaults.message = '<img src="Images/ajax-loader.gif" />';
     
                      var request = Sys.WebForms.PageRequestManager.getInstance();
                      request.add_initializeRequest(function (sender, args) {
                          request.get_isInAsyncPostBack() && args.set_cancel(true);
                      });
                      request.add_beginRequest(function () { $.blockUI(); });
                      request.add_endRequest(function () { $.unblockUI(); });
                  }
              }
          });
     
          $(document).ready(function () {
              $.initializeUiBlocking();
          });