[jQuery] how can I wait until blockUI shows

2008-11-08 Thread Gubo

Hi all,

I am very new to jquery, so please excuse my maybe newbie question :)
I have a following problem:
when I call blockUI and execute JS afterwards, the blockUI shows after
the JS finished executing.
When I put alert after calling blockUI, it shows right after alert
pops up. I suppose, that without the alert the IE is too busy
executing JS and therefore does not show the blockUI. The question is,
how can I give blockUI time to show before rest of JS is executed.

thank you in advance

Michael


[jQuery] Re: how can I wait until blockUI shows

2008-11-08 Thread Gubo

Hello Mike,

it worked. thank you very much.

Michael

On Nov 8, 7:30 pm, Mike Alsup [EMAIL PROTECTED] wrote:
  I am very new to jquery, so please excuse my maybe newbie question :)
  I have a following problem:
  when I call blockUI and execute JS afterwards, the blockUI shows after
  the JS finished executing.
  When I put alert after calling blockUI, it shows right after alert
  pops up. I suppose, that without the alert the IE is too busy
  executing JS and therefore does not show the blockUI. The question is,
  how can I give blockUI time to show before rest of JS is executed.

 Use a timeout for that.   Something like this:

 $.blockUI();
 setTimeout(function() {
     // do other stuff
     ...

     $.unblockUI();

 }, 100);