Mike Alsup wrote:
>> For example, reading through the code it is not obvious to me how the
>> function $.blockUI() blocks continued execution of javascript ...
>
> It doesn't. All blockUI does it put an iframe over the window and
> capture/discard keystrokes. The idea is to block the user from using
> the UI until unblockUI is called. Blocking continued execution of
> javascript would be self-defeating.
Yes, you are correct. What I am trying to do is a modal dialog. My page
has a form that is updated by user interaction. If the user tries to
move on without save the data, I want to pop a modal dialog with a SAVE
and CONTINUE button. The SAVE button saves the data and both buttons
dismiss the dialog. While the dialog is up, I need the UI blocked.
So the simple test case works great, but if I call it directly is does
not wait to be dismissed.
> I'm not entirely sure what you're attempting to do, but one thing you
> should be aware of is that when you pass a message or DOM element to
> blockUI it first discards the current message (via empty()) and then
> adds the new one. So if you plan to use a DOM element be sure to
> cache it first, like the demo page does. Otherwise the next time you
> call this:
>
> $.blockUI($('#dirtyFormMessage')[0]);
>
> jQuery will not find the dirtyFormMessage element.
Thanks, I noticed the empty() but didn't pickup on the side effect.
-Steve
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/