Reputation: 3269
Is there a way to get a jQuery modal dialog to be "truly" modal?
For example, if I create a confirmation dialog for a yes/no, how do I wait for the response from the user before processing anything else.
TIA
Upvotes: 1
Views: 1440
Reputation: 7133
You have to place your logic for after the dialog into the dialog's button events. You can't use it to pause execution of a method mid stream. Only the native javascript alert/confirm boxes can do that.
$( ".selector" ).dialog({ buttons: [
{
text: "Ok",
click: function() {
// do whatever you want on OK.
}
}
] });
http://jqueryui.com/demos/dialog/
Upvotes: 1