Getting a callback when a UI is closed

1 view
Skip to first unread message

Ben Christel

unread,
Aug 4, 2011, 11:22:19 AM8/4/11
to Emerson Scripting Language: Users
Is there a way to register a callback for when a UI's close button
gets clicked? I want my UI to be able to know when it's about to
close so it can save the user's input by sending it to the presence
that manages the UI.

If there's no good way to do that, then can I hide or disable the
built-in close button somehow?

Ewen Cheslack-Postava

unread,
Aug 4, 2011, 1:21:24 PM8/4/11
to emerso...@googlegroups.com

Absolutely. We use a modified version of the standard JQuery UI dialog
http://jqueryui.com/demos/dialog/, so things should just work as they
do with a dialog.

In your case, you probably want to use beforeClose so you can get
information out before the dialog is destroyed:

sirikata.ui.window(
'#selector',
{
beforeClose: function(event, ui) {
// ui is the thing closing
}
}
);

-Ewen

Reply all
Reply to author
Forward
Message has been deleted
0 new messages