var win = new Ext.Window({
title : "讀者資料",
layout : "fit",
items : [new Ext.FormPanel({
id : "author_form",
frame : true,
labelWidth : 60,
autoHeight : true,
autoWidth : true,
url : "author_json.jsp",
buttons : [{
text : "確定",
handler : function() {
var f = this.ownerCt;
Ext.getCmp("author_form").getForm().submit({
success : function() {
Ext.Msg.alert("success!");
},
failure : function() {
// Ext.Msg.alert("failure!");
}
})
// 錯(cuò)誤: 提交不了表單元素.原因: submit方法是異步提交,不等提交完成就返回,所以提前執(zhí)行了關(guān)閉功能,無(wú)法提交數(shù)據(jù).
//f.ownerCt.close();
}
}],
items : [new Ext.form.TextField({
fieldLabel : "編號(hào)",
name : "author_num"
})]
})]
});
win.show();
posted on 2009-04-03 11:51
紫蝶∏飛揚(yáng)↗ 閱讀(5018)
評(píng)論(1) 編輯 收藏 所屬分類:
EXTJS