1
我在sencha touch 2中創建了一個ajax請求,當我收到成功消息時,如何設置返回值給會話,還請告訴我通過哪種方式獲取會話中的值也。Sencha Touch 2 Session Storage
submitLoginForm: function() {
var form = this.getLoginForm().getValues();
Ext.Ajax.request({
url: '../../authenticate.php',
method: 'POST',
params: {
email: form.email,
password: form.password
},
success: function(response) {
var json = Ext.decode(response.responseText);
if(json.message == 'success') {
Ext.Msg.alert('Login Success.....');
//Here i want to store return data in session
} else {
Ext.Msg.alert('Invalid Login Or Password.....');
}
},
failure: function(response) {
Ext.Msg.alert('The request failed.....');
}
});
},