Upload Extjs Ajax
http://dev.sencha.com/deploy/dev/examples/form/file-upload.html
Thecore script comes with the Ext JS package, in your main HTML file (where you have linked to the core Ext scripts), in the head section after your other scripts put:
Sadly, there isnt a huge amountof documentation on this element of Ext JS- however for basic functionality, you can create a form with an async upload field using the below:
myuploadform= new Ext.FormPanel({fileUpload: true,
width: 500,
autoHeight: true,
bodyStyle: 'padding: 10px 10px 10px 10px;',
labelWidth: 50,defaults: {
anchor: '95%',
allowBlank: false,
msgTarget: 'side'
},
items:[{
xtype: 'fileuploadfield',
id: 'filedata',
emptyText: 'Select a document to upload...',
fieldLabel: 'File',buttonText: 'Browse'
}],
buttons: [{
text: 'Upload',
handler: function(){if(myuploadform.getForm().isValid()){
form_action=1;
myuploadform.getForm().submit({
url:'handleupload.php',
waitMsg: 'Uploading file...',
success: function(form,action){
msg('Success', 'Processedfile on the server');
}
});
}
}
}]
})
What this code...
Regístrate para leer el documento completo.