PDA

View Full Version : Ext.Msg.Alert in parent window



nareshkokkula
17 Dec 2013, 5:00 AM
Hi,

I have a modal window in my form which is having alerts with in it using Ext.Msg.Alert.

However, the message is not floating on main window.
Can this be made with any config properties for Ext.Msg or work around.

Appreciate guidance.

Thanks in Advance.
Naresh

scottmartin
17 Dec 2013, 6:26 AM
So you are trying to place an alert window on top of a modal window?

nareshkokkula
17 Dec 2013, 8:09 PM
Yes Scottmartin (http://www.sencha.com/forum/member.php?165873-scottmartin),

Below is the screenshot that when I click on button1, a popup window appears and which contains the alert windows.
I cannot drag the messagebox out of modal popup window.

Is it possible to show message window out of the modal window?

47269
Thanks,
Naresh

scottmartin
18 Dec 2013, 9:10 AM
You can drag this alert outside:



Ext.application({
name : 'Fiddle',

launch : function() {

Ext.create('Ext.Button', {
text: 'Click me',
renderTo: Ext.getBody(),
handler: function() {

Ext.create('Ext.window.Window', {
title: 'Hello',
height: 300,
width: 400,
modal: true, // modal
layout: 'form',
items: {
xtype: 'button',
text : 'Button',
handler: function(btn){
Ext.Msg.show({
title:'Save Changes?',
msg: 'Save changes?',
buttons: Ext.Msg.YESNO,
icon: Ext.Msg.QUESTION
});
}
}
}).show();

}
});

}
});

nareshkokkula
19 Dec 2013, 6:31 AM
You can drag this alert outside:



Ext.application({
name : 'Fiddle',

launch : function() {

Ext.create('Ext.Button', {
text: 'Click me',
renderTo: Ext.getBody(),
handler: function() {

Ext.create('Ext.window.Window', {
title: 'Hello',
height: 300,
width: 400,
modal: true, // modal
layout: 'form',
items: {
xtype: 'button',
text : 'Button',
handler: function(btn){
Ext.Msg.show({
title:'Save Changes?',
msg: 'Save changes?',
buttons: Ext.Msg.YESNO,
icon: Ext.Msg.QUESTION
});
}
}
}).show();

}
});

}
});



Thanks for the Reply

Below is my code in which I'm using a componet as items for the Ext.window

var win = new Ext.Window({
id: '6900f4f7-2e0d-473e-82f2-59b404cfedd8',
width: 800,
height: 500,
modal: false,
layout: 'fit',
closable: true,
autoScroll:false,
items: embeddedWebpage,
}
});


win.show();
}

//Class
Ext.define('Forms.Controls.Standard.EmbeddedPage', {
extend: 'Ext.Component',
autoEl: {
tag: 'iframe'
},
.......

This is causing the issue. Can you please advice me how to handle with components in modal windows (having iframes).

Thanks,
Naresh

scottmartin
19 Dec 2013, 7:27 AM
iFrame is a separate instance .. you will not be able to drag outside of the iframe.

nareshkokkula
19 Dec 2013, 8:48 PM
iFrame is a separate instance .. you will not be able to drag outside of the iframe.

Thanks Scottmartin,

Can we make the messagebox to work as alert boxes in certain situations like this by overriding the existing functionality.. Please advice.