我正在使用 extjs 文件上传面板成功上传文件。
我的问题是,在我上传文件后,waitMsg 消失了,但屏幕没有集中在我的应用程序上,并且卡在灰屏中。
{
xtype: 'button',
id: 'btnUploadExcelBidId',
icon: 'images/V16x16.png',
text: 'load',
listeners: {
click: {
fn: function(button, e, options) {
Ext.create('Ext.form.Panel', {
title: 'Upload Bid',
width: 400,
bodyPadding: 50,
margin: 300,
frame: true,
renderTo: Ext.getBody(),
items: [{
xtype: 'filefield',
name: 'photo',
fieldLabel: 'Photo',
labelWidth: 50,
msgTarget: 'side',
allowBlank: false,
anchor: '100%',
buttonText: 'Select Excel...'
}],
buttons: [{
text: 'Upload',
handler: function() {
var form = this.up('form').getForm();
this.up('window').close();
if(form.isValid()){
alert('starting upload');
form.submit({
url: 'UploadExcel.jsp',
waitMsg: 'Uploading Excel...',
waitMsgTarget: true,
success: function(fp, o) {
alert('Your photo "' + o.result.file + '" has been uploaded.');
},
failure: function(fp, o) {
alert('fail');
}
});
}
}
}]
});
}
}
}
}