You can't have a callback just not get fired in select situations.
You'll either need to set a flag somewhere and check that flag in your
callback or temporarily remove the close callback.
This is untested, but should work:
var callback = $(el).data('close.dialog');
$(el).data('close.dialog', null).dialog('close').data('close.dialog',
callback);
On Aug 29, 2:22 pm, Shao Kang Tat <[EMAIL PROTECTED]> wrote:
> Hi,
>
> We have a situation where we provide close callback for a dialog like
> this:
>
> $(this.modalContent).dialog({ bgiframe:true, close:function()
> { something.focus() }, modal:true, resizable:false....});
>
> This works fine when the user hits the "X" button at the upper right
> hand corner as focus is placed in the appropriate spot.
>
> If the user chooses to hit the "continue" button, we basically trigger
> another dialog that contains some sort of Confirmation info. But
> before we can do that we must close the current dialog that's already
> open. However, by closing the dialog, the callback option is
> triggered before the new dialog appears.
>
> Is there a way to close the dialog such that if there is a callback
> option passed in, it does not get triggered?
>
> Thanks,
> Shao
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---