As Scott mentioned this is not a limitation on how jQuery UI dialog works, but a limitation of javascript itself. If the javascript were to wait and return a value, the browser would lock, allowing no interaction. The built-in browser confirm dialog is unique in this respect. The only way to do this with javascript is with a callback function.
- Richard On Tue, Dec 30, 2008 at 7:47 AM, daveyoi <[email protected]> wrote: > > Hey Carl, > > Did you find a solution to this? - I am currently attempting the same > thing but due to the way ui.dialogs work cant get it to control logic > flow. > > Thanks > Dave > > On Dec 17, 4:28 pm, Carl Von Stetten <[email protected]> wrote: > > I think I understand what you mean about the asynchronous nature of > > dialogs. I'm trying to create a reusable css-styleable confirmation > > dialog that I can call from various points in my code, in the same way > > the standard javascript confirm() dialog is called. Can you suggest a > > way to make this work? I'm not that well versed on them, but could I > > use a closure to make it work? > > > > Thanks, > > Carl > > > > On Dec 17, 8:50 am, Scott González <[email protected]> wrote: > > > > > Dialogs are essentially asynchronous so the confirm function is > > > returning before the user clicks either button. You need to put the > > > logic for what to do inside the button functions. > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
