views:

23

answers:

1

i have a long ajax call so i am using blockui like this . .

  $("#roadmapContainer").block({ message: '<h2>Loading Ajax Request</h2><br/><img src="/Content/images/ajax-loader.gif" />' });

   $.post(timelineUrl, function(data) {

         onLoad(data);
         $("#roadmapContainer").unblock();

inside teh "onLoad()" method it takes a long time so i want something where i can have the "message of block UI change from

"Loading Ajax Request"

to

"Parsing Results"

before i unblock.

is this possible with jquery blockui ?

+1  A: 

As far as I can tell from blockui's documentation, you can call block() again to replace the message -- you don't need to call unblock() for every time you call block(). Just do that before your onLoad() call and you should be golden.

Also, keep in mind that if onLoad() is synchronous, your browser will still be locked up while you're waiting for onLoad() to finish.

Faisal