extjs4.0 支持ie8_extjs4.1 ie8 出错

2、chrome、firefox正常运行

3、ie8 出错(360浏览器 同样)

错误: Object doesn't support this property or method :line 17 character 4

代码如下:(出错行在:loginForm = Ext.getCmp('loginForm'); )

Ext.define('XAYP.view.login.LoginWindow', {

extend : 'Ext.window.Window',

alias : 'widget.loginWindow',

title : '用户登录',

border : false,

layout : 'fit',

plain : true,

resizable : false,

buttonAlign : 'center',

requires : [ 'XAYP.view.login.LoginForm', 'XAYP.common.Definition', 'XAYP.proxy.Proxy' ],

initComponent : function() {

this.items = [ {

id : 'loginForm',

xtype : 'loginForm'

} ];

confirmButtonClick = function() {

loginForm = Ext.getCmp('loginForm');//出错指示行

if (loginForm.form.isValid()) {

loginForm.form.submit({

timeout : 60,

waitTitle : '登录中',

method : 'POST',

params : {

username : loginForm.form.username,

password : loginForm.form.password

},

waitMsg : '正在进行登陆验证,请稍后...',

url : XAYP.common.Definition.getRootUrl_Port() + '/userLogin/', // 提交到servlet地址

success : function(form, action) {

Ext.util.Cookies.set('username', action.result.username);

// Ext.util.Cookies.set('token',action.result.token);

if (action.result.success == true) {

window.location.href = "index.html";

} else if (action.result.success == false) {

Ext.Msg.alert('错误提示', action.result.msg);

}

},

failure : function(form, action) {

// Ext.Msg.alert('系统提示', action.result.text);

switch (action.failureType) {

case Ext.form.Action.CLIENT_INVALID:

Ext.Msg.alert('错误提示', '表单数据非法请核实后重新输入!');

break;

case Ext.form.Action.CONNECT_FAILURE:

Ext.Msg.alert('错误提示', '网络连接异常!');

break;

case Ext.form.Action.SERVER_INVALID:

Ext.Msg.alert('错误提示', "您的输入用户信息有误,请核实后重新输入!");

}

loginForm.form.reset();

}

});

}

};

this.buttons = [ {

text : '登录',

handler : confirmButtonClick

}, {

text : '重置',

handler : function() {

loginForm = Ext.getCmp('loginForm');

loginForm.form.reset();

}

} ];

this.listeners = {

keypress : {

element : 'body',

fn : function(e) {

if (e.getKey() == Ext.EventObject.ENTER) {

confirmButtonClick();

}

}

},

dblclick : {

element : 'body',

fn : function() {}

}

};

this.callParent(arguments);

},

logger : function(text) {

console.log("XAYP.view.tabs.UserListPanel: " + text);

},

flushView : function() {

this.doComponentLayout();

},

loadView : function() {

this.doComponentLayout();

}

});

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值