You can't.  alert and confirm are browser based controls.  Everything else
is an html based widget which can not and should not have the ability to
block the browser like alert and confirm.

The general solution is to put the stuff you would have after the dialog
open call inside of the button and dialog close events.

On Tue, Nov 24, 2009 at 1:57 AM, Rushi <rushike...@gmail.com> wrote:

> Hi,
>
> I am using a JQuery UI modal dialog to ask a confirmation to the user.
> The dialog has buttons "Save" and "Cancel". If user clicks "Save", I
> make an AJAX call to do a database update and if he clicks "Cancel", I
> need to ignore his changes. The problem I am facing is when I open the
> dialog using dialog.open, it doesn't stop processing the javascript
> that follows after the dialog.open statement. How do I make the modal
> dialog really "modal", identical to javascript "confirm"? The JQuery
> UI modal dialog seems to only disable the keystrokes/mouse clicks but
> I want it to stop processing the javascript code until the user
> chooses an option !!
>
> Any help is greatly appreciated. I am kinda stuck..
>
> Thanks !
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "jQuery UI" group.
> To post to this group, send email to jquery...@googlegroups.com.
> To unsubscribe from this group, send email to
> jquery-ui+unsubscr...@googlegroups.com<jquery-ui%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/jquery-ui?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to jquery...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en.


Reply via email to