我不明白为什么在 Firefox 中一切正常,但在 IE 7 中出现以下错误:
消息:此操作的目标元素无效。行:6455 字符:21 代码:0 URI:http://extdev/gdevapp/extjs/ext-all-debug.js
下面是我的代码。错误发生在 mainapp.add 语句的行中(提前感谢):
doConnect:function(btn){
var winlogin=btn.up('window');
var statusbarlogin=winlogin.down('statusbar');
var myloginform=winlogin.down('form');
if (myloginform.getForm().isValid()) {
statusbarlogin.showBusy();
//submit form to login
myloginform.submit({
url :'/gdev/ngsecure.glogin',
method :'POST',
scope :this,
success :function(form,action){
var msgtxt=action.result.data.msgtxt;
devglob.userid=action.result.data.userid;
devglob.connid=action.result.data.connid;
devglob.userfullname=action.result.data.userfullname;
devglob.userfunction=action.result.data.userfunction;
statusbarlogin.setText(msgtxt+'\/ID Utilisateur : '+devglob.userid);
//BuildApplication
var mainapp=Ext.getCmp('mainapp');
var appview=Ext.getCmp('appview');
if (!appview) {
//load and render the main application
mainapp.removeAll();
mainapp.add(Ext.widget('appview'));
mainapp.doLayout();
//Build a toolbar items
var mytoolbar=Ext.getCmp('toolbarapp');
mytoolbar.loadItems(devglob.userid);
};
//close the login window
winlogin.close();
},
failure:function(form,action){
var msgtxt=action.result.data.msgtxt;
Ext.MessageBox.alert('Erreur',msgtxt);
}
});
}
else {
}
//get result ajax
}