0
我成功上傳文件與extjs文件上傳面板。Extjs - 上傳文件,但屏幕卡住「灰色」
我的問題是,我上傳文件後,waitMsg消失,但沒有重新聚焦在我的應用程序,它卡在一個灰色屏幕中的screan。
{
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');
}
});
}
}
}]
});
}
}
}
}
你能發佈源代碼嗎? – shiva
添加了源 – susparsy