当前位置: 代码迷 >> Web前端 >> Ext获取后台老板回传数据
  详细解决方案

Ext获取后台老板回传数据

热度:115   发布时间:2012-07-01 13:15:00.0
Ext获取后台回传数据
function submitForm() {
if (dataForm.isAdd) {
dataForm.form.submit({
clientValidation : true,
waitMsg : '正在提交数据,请稍候......',
waitTitle : '提示',
url : 'evaAdd.action',
delay : 300,
method : 'POST',
success : function(form, action,response) {
win.hide();
var re = eval(action.result.data);
alert("result == " +re[0].id);
Ext.Msg.alert('提示', '新增成功');
var store = afnExt.evaluation.stores.EvStore;
store.clear;
store.load();
},
failure : function(form, action) {
Ext.Msg.alert('提示', '新增失败');
}
});
} else {
dataForm.form.submit({
clientValidation : true,
waitMsg : '正在提交数据请稍后',
waitTitle : '提示',
url : 'evaEdit.action',
method : 'POST',
success : function(form, action) {
win.hide();
updateGrid(action.result.dataId);
Ext.Msg.alert('提示', '修改成功');
},
failure : function(form, action) {
Ext.Msg.alert('提示', '修改失败');
}
});
}
}
  相关解决方案