我有一个非常简单的Extjs 5登录表单:Ext.onReady(function(){
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'side';
var login_form = new Ext.form.FormPanel({
url: 'verifylogin/index',
monitorValid: true,
labelWidth: 75,
frame: true,
height: 170,
width: 360,
defaultType: 'textfield',
defaults: {
allowBlank: false
},
items: [
{
fieldLabel: 'Username',
name: 'username',
plugins: [{
ptype: 'capslockdetector',
title: 'Caps lock is on',
message: 'Caps Lock is ON!'
}]
},{
fieldLabel: 'Password',
name: 'password',
inputType: 'password',
plugins: [{
ptype: 'capslockdetector',
title: 'Caps lock is on',
message: 'Caps Lock is ON!'
}]
}],
buttons: [
{
text: 'Login',
formBind: true,
handler: function (btn, evt) {
login_form.getForm().submit();
}
}]
});
var login_window = new Ext.Window({
id: 'window',
title: 'Login',
modal: true,
height: 200,
width: 370,
items: [login_form]
});
login_window.show();
});
此表单发送用户名和密码我的codeigniter控制器 . 此控制器检查数据:如果用户提供错误的用户名和密码,则$ this-> load-> view('login_view'); (这是extjs登录表单和窗口) . 如果用户提供了良好的数据,那么$ this-> load-> view('good_view'); .
我的代码:(verifylogin / index)
if($login == FALSE) {
$this->load->view('login_view');
}
else {
$this->load->view('good_view');
}
我的问题:表单和控制器正在工作,但我看不到视图('login_view')或视图('good_view') . 我写了close()事件(然后用户给出了好的数据),但我看不到$ this-> load-> view('good_view');.只有我看不到更多的登录窗口 .
为什么?问题出在哪儿?