PDA

View Full Version : Ext.Messagebox is not visible on browser close event.



ged23
8 Mar 2017, 7:44 AM
Hi,

I want to show the message box to user when user clicks on browsers close button, But it doesn't shows the message box. But if I show the javascript alert just after the ext messagebox then I can see both Ext messagebox and javascript alert . Below is code,

window.onbeforeunload = function(){

if(someConditionIsTrue){


showPopUpIfPendingDepsInNewUI();
}
some code is here.....
}

showPopUpIfPendingDepsInNewUI() function is in another file as below:

function showPopUpIfPendingDepsInNewUI() {
Ext.Msg.show({
title : 'title',
msg : 'msg',
buttons : Ext.Msg.OK,
fn : function(btn) {
if (btn == 'ok') {
some code is here
}
}
});
}

But window is getting closed and there is no messagebox

Gary Schlosberg
9 Mar 2017, 6:23 AM
Not sure why that would be. Are you able to post a runnable test case which exhibits the behavior?