If your function were to truly block, the user would not be able to interact
with any elements (read: your modal dialog). Here's the pattern:
$("#dialog").dialog({
buttons: {
"Ok": function() { // do something with $(this).find('control').val() },
"Cancel": function() { // close dialog }
}
});
- Richard
On Mon, Sep 15, 2008 at 6:24 AM, goodwill <[EMAIL PROTECTED]>wrote:
>
> I want to see if there's any recipes to wrte something like this:
>
> function getResponse() {
> $('#dialog').dialog(...);
> // now function block up here
> return $('#dialog').find('control').val();
> }
>
> basically I want the dialog works really like a modal dialog to block
> the function until it comes back. I can think of something really
> looks a bit stupid- a loop with a idle timeout checking the isOpen
> status for the dialog. However I would like to see if there is anybody
> did something better for it already :)
>
>
> Thanks for help.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---