PDA

View Full Version : Ext.Msg.alert Problem



kalimsayyad05
26 Aug 2012, 11:30 PM
Hi,I am using Ext.Msg.alert for displaying my error messages and other details.I am using it in different conditions.The problem i am facing is i get the alert box message but previously message is also displayed in that box.Is there any issue with Ext.msg.alert box beacuse its not working properly or is there any specific way to use it ,please tell me

thnx,
Kalim

sword-it
26 Aug 2012, 11:35 PM
Hi,

may you provide your code for better understanding the problem

mkm_2013
13 Nov 2013, 6:45 AM
I have recently migrated my app from extjs3.2 to 4.2.
The extjs.Msg.show or alert is not displayed in 4.2 after migration .Here is my code
Ext.MessageBox.show({
title: 'Warning',
msg: resp.responseText.replace("ERROR:", ""),
icon: Ext.window.MessageBox.INFO,
closable: false,
buttons: Ext.MessageBox.YESNO,
buttonText: {
//requirement - reverse the buttons
yes: 'Do Not Lock Subject(s)',
no: 'Lock Subject(s)'
},
fn:function(btn) {

switch(btn) {
case 'no' : //actually means 'Lock'

updateParams.userReviewed = true;

Ext.Ajax.request({
url:'/stdy/admin/subject/servlet/LockUnlockSubjects.do',
params: updateParams,

callback: function(opt, ok, resp) {
Ext.Msg.alert('Information', 'Selected subjects have been successfully locked.');

subjectStore.load({
params:{
start:(page - 1) * 15,
limit:15
}
});
}

});
break;
case 'yes' : //actually means 'Do not lock'
break;
}
}
});

Can anybody please let me know whats wrong. i tried setTimeout too but still the messagebox doesn't show.Please help me

halcwb
13 Nov 2013, 4:43 PM
Tried to reproduce your message box, but without making the actual calls to the server, in this fiddle the messages appear:

1i7

Are you sure that there isn't a problem in the functions you pass with the config?

mkm_2013
14 Nov 2013, 11:43 AM
This code work just fine in extjs3.2 after migration to 4.2 , the messagebox doesn't appear.

halcwb
14 Nov 2013, 12:27 PM
This code work just fine in extjs3.2 after migration to 4.2 , the messagebox doesn't appear.

The first or the second message box?

mkm_2013
15 Nov 2013, 5:17 AM
Ext.Msg.alert,show are working fine in extjs3.2 , same code i tried in extjs4.2 after migration it fails. the msgbox doesn't show up. Hence i tried Ext.MessageBox.show also in extjs4.2, it fails, I am not sure how to fix this.