curiouswebster
asked on
JavaScript: need to close pop-up after aborted close
Why is my pop-up not closing?
Tis is a window created by my jquery plug-in. And I need to capture the Close button, if there are changes, then enable the user to save before closing the box.
I have the box popping up, and once resolved, set:
self.tabDirtyId = undefined
My debugger show it's working, but the window does not close.
Suggestions?
Tis is a window created by my jquery plug-in. And I need to capture the Close button, if there are changes, then enable the user to save before closing the box.
I have the box popping up, and once resolved, set:
self.tabDirtyId = undefined
My debugger show it's working, but the window does not close.
Suggestions?
$('<button>',
{
'type': 'button',
'class': 'close',
'data-dismiss': 'modal',
'aria-label': 'Close',
'append': $('<span>',
{
'aria-hidden': 'true',
'html': '×'
}),
'click': function (event) {
if (self.tabDirtyId != undefined) {
self.closeBoxClicked = true;
event.stopPropagation();
self.confirmSaveBox(event, self);
}
}
}),
configSelectorDialog.prototype.finalizeTabChange = function (event, widget) {
var self = this;
if ( self.closeBoxClicked) {
widget.tabDirtyId = undefined;
$('.close').triggerHandler('click');
}
};
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER