I have a problem with submiting ExtJs form. I can’t get a success function.
I have:
formp = new Ext.FormPanel({
fileUpload: true,
width: 350,
autoHeight: true,
bodyStyle: 'padding: 10px 10px 10px 10px;',
labelWidth: 70,
defaults: {
anchor: '95%',
allowBlank: false,
msgTarget: 'side'
},
items:[{
xtype: 'fileuploadfield',
id: 'filedata',
emptyText: 'Выберите файл для загрузки...',
fieldLabel: 'Имя файла',
buttonText: 'Обзор'
}],
buttons: [{
text: 'Загрузить',
handler: function(){
formp.getForm().submit({
url: url_servlet+'doUpload.jsp',
success: function(formp, o) {
alert(o.responseText);
}
})
}
}]
})
in doUpload.jsp I have out.println("1111");
In fireBug I see that doUpload.jsp POST 1111 but not have a alert. What’s wrong?
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.form.Basic-method-submit