PDA

View Full Version : Ext.window.MessageBox.alert is naver shown as modal.



kohhy
5 May 2012, 8:12 PM
Hi,

I use Ext.window.MessageBox.alert() as alternative of JavaScript's native alert(), but one problem is exist.

If there are some parallel work in WebApp and it shows own window, the window shows above alert window.
Is there any way to show Ext.window.MessageBox.alert() always modal?

vadimv
6 May 2012, 12:02 AM
Use show not alert then, with the config of alert plus modal config set to true


alert: function(cfg, msg, fn, scope) {
if (Ext.isString(cfg)) {
cfg = {
title : cfg,
msg : msg,
buttons: this.OK,
fn: fn,
scope : scope,
minWidth: this.minWidth,
modal: true
};
}
return this.show(cfg); },

kohhy
26 May 2012, 8:03 PM
It not works...

Maybe what I want is difficult cause JavaScript is non-blocking language.
I decide to use native (blocking) messagebox instead of ExtJS's one.

vadimv
27 May 2012, 3:06 AM
I answered to your question, even if alert is by default modal. BUT reading again what you are trying to achieve, I suggest you to play with z-index, and probably with the zindex manager.