yes, but the problem is i don't know what is #myDiv at the time i set blockUI as default ajax action. And yes, i get the data via load().
Following your suggestion, i'll keep on trying... Tue, Apr 8, 2008 at 3:51 PM, Mike Alsup <[EMAIL PROTECTED]> wrote: > > > On Tue, Apr 8, 2008 at 9:42 AM, Alexandre Plennevaux > <[EMAIL PROTECTED]> wrote: > > > > hi again! > > > > i understand from the blockUI doc that using this super simple call, i > > can default all ajax calls to use blockUI. > > > > $().ajaxStart($.blockUI).ajaxStop($.unblockUI); > > > > > > Yet, i would like to know if it would be possible for the default > > behaivour to block the related element (that will receive the fetched > > data), instead of blocking the whole page, so something like > > > > $().ajaxStart($.block).ajaxStop($.unblock); > > > > I tried that and it didn't work. Also tried this: > > > > blockMe = function(){ > > $(this).block({ > > message: '<h1>Aaaaaargl, I\'m being blocked!!!!</h1>' > > }); > > } > > unBlockMe = function(){ > > $(this).unblock(); > > } > > $().ajaxStart(blockMe).ajaxStop(unBlockMe); > > > > but no luck either . It's probably not that simple ... > > > > Thanks for your attention ! > > Change this line: > > > $(this).block({ > > > > How are you getting the data? If you're using load then this should work: > > $('#myDiv').block().load('myurl', function() { $(this).unblock() }); > > Mike > -- Alexandre Plennevaux LAb[au] http://www.lab-au.com