I am initialising a jQuery-UI dialog with close function defined as below:
$("#msg").dialog({
width: '390',
height: '320',
modal: true,
autoOpen: false,
closeOnEscape: false,
resizable: false,
close: function (event, ui) {
window.location = "http://www.somewere.com";
}
});
This dialog was being called from numerous places and since the logic was to always redirect after giving the user the message, so I placed it in initialisation.
Now the requirement is to change just one logic where the workflow will be on the same page.
How can I disable the close function just before opening this dialog?