日期:2014-05-16  浏览次数:20584 次

Ext Message 显示在最上层的问题
我用 Ext.Msg.alert() 函数弹出显示信息的时候在最上层,结果老是被底下的其他的窗口遮住了,后来改为用 Ext.Msg.show()函数并在其中加上manager,modal属性,最后定义的WindowGroup的bringToFront方法是可以,如果想用 Ext.Msg.alert 方法把弹出的窗口显示在最上面应该怎样做呢?
------解决方案--------------------
顶起来,没人做过吗?
------解决方案--------------------
。。。。。。。。。。。。。
------解决方案--------------------

 你直接用alert 不就好了吗

------解决方案--------------------
在IE下可以正常显示,但在Firefox下会被其他打开的窗口遮住
------解决方案--------------------

 你把代码贴出来看看

------解决方案--------------------
估计是写的地方有问题了.

------解决方案--------------------
用这个技术的人很少吗?
------解决方案--------------------

userForm.form.doAction('submit', {
url : 'user!updatePass.action',
method : 'post',
params : {oldPassword: _oriPass,newPassword: _newPass,confPassword: _confPass},

success : function(form, action) {
/*var msg = Ext.Msg.show({
   title: 'Information',
   msg: 'Change password success!',
   width: 280,
   buttons: Ext.MessageBox.OK,
   manager: mygroup,
   modal: true,
   fn: function(){
var desktop = MyDesktop.getDesktop();
    var wins = desktop.getWindow('change-password');
    wins.close();
},
   icon: Ext.MessageBox.INFO
});
mygroup.bringToFront(msg.getDialog());*/
Ext.Msg.alert('Information','Change password success!',function(){
var desktop = MyDesktop.getDesktop();
    var win = desktop.getWindow('change-password');
    if(win) win.close();
});
},

failure : function() {
Ext.MessageBox.alert('Information', 'Username or password is invalid!');
}
});
}

------解决方案--------------------
我试了在IE和火狐里Ext.MessageBox.alert都能显示在前面的啊 没被挡住呢~~
------解决方案--------------------
I did not meet this kind of problem.
u should make sure that there isn't any other panel is generated after you alert a message and u can try to remove the function in alert method.
------解决方案--------------------
当然没有其他方法执行,我的程序是在Extjs desktop基础上扩展的,如果已经开了多个窗口的话就会被遮住,如果总共只有两个开了的话, firefox又正常显示
------解决方案--------------------
是模态窗体的时候就会被遮住,我在找答案,楼主也不表达清楚,比如第二层窗体弹出来的框就会到下面去,不会再最上面!