我有一个J2EE Web应用程序,其中包含一个表单,我将文件上传到服务器上的某个位置.在上传期间,向用户显示waitMsg,一旦上传完成,msgBox指示相同,就会消失.成功案例的代码也在js文件中提供.但是上传工作正常,但即使在服务器上传完成后,waitMsg仍会继续.
给出了js代码:
Ext.onReady(function(){
Ext.QuickTips.init();
var msg = function(title, msg){
Ext.Msg.show({
title: title,
msg: msg,
minWidth: 200,
modal: true,
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK
});
};
var fp = new Ext.FormPanel({
renderTo: 'fi-form',
fileUpload: true,
width: 500,
frame: true,
title: 'Upload XML Config File ',
autoHeight: true,
bodyStyle: 'padding: 10px 10px 0 10px;',
labelWidth: 50,
defaults: {
anchor: '95%',
allowBlank: false,
msgTarget: 'side'
},
items: [{
xtype: 'fileuploadfield',
id: 'form-file',
emptyText: 'Select the xml File to upload',
fieldLabel: 'File',
name: 'file', …Run Code Online (Sandbox Code Playgroud) 我有一个表单,提交方式如下:
form.submit({
url: '/postme',
waitMsg: 'Loading...',
method: 'POST',
success: function (form, action) {
console.log(action.response.responseText);
}
});
Run Code Online (Sandbox Code Playgroud)
但!回答的主要问题是我没有财产success: true,无法设法添加它.有没有办法callback在Ext.Ajax.request中创建类似参数的东西
而不是success?或者也许有一种方法告诉form.submit()它必须检测其他responsece参数的成功?
BTW:a不能使用Ext.Ajax.request,因为我必须从表单传递多部分数据(文件上传).
提前致谢.