PDA

View Full Version : Ajax upload.Help!



bssoft2b
23 Nov 2011, 9:31 PM
It does not work file uploads.
After the call upload function the message of succession - and everything! In the console, firebug does not see the request. The reason?

function uploadFile(formId, uploadControlller) {
var ajax = {
url: uploadControlller, // asp.net mvc controller
form: formId, //
isUpload: true, //
success: function () {alert('success') }, //
failure: function () { alert('failure') } //
};
Ext.Ajax.request(ajax); //
}
...
...

{
xtype: 'form',
bodyStyle: 'padding:5px',
height: 500,
width: 478,
labelWidth: 150,
labelSeparator: ' ',
items: [self.DateBegin, self.cbKvp, self.cbKtp, self.cbKvn1, self.cbKvn2, self.txtStat,
{
xtype: 'form',
id:'frmUpload',
name: 'frmUpload',
fileUpload:true,
items: [self.fuDoc]
}
]
}
]
....

if (self.fuDoc.getValue() != "") {
uploadFile("frmUpload", "/Personnel/UploadFile");
}

bssoft2b
23 Nov 2011, 9:33 PM
self.fuDoc = new Ext.form.FileUploadField({
width: 200
});