Upload Extjs Ajax

Páginas: 2 (311 palabras) Publicado: 11 de octubre de 2012
As far as specific steps are concerned, using functionality supported in ExtJS 3x, your best best is to use this module/plugin:
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...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Ajax javascript + php upload script
  • Upload
  • ajax
  • ajax
  • Ajax
  • Ajax
  • ajax
  • Ajax

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS