4 'Ext.window.MessageBox'
7 Ext.onReady(function(){
9 var msg = function(title, msg) {
20 var fibasic = Ext.create('Ext.form.field.File', {
26 Ext.create('Ext.button.Button', {
27 text: 'Get File Path',
28 renderTo: 'fi-basic-btn',
30 var v = fibasic.getValue();
31 msg('Selected File', v && v != '' ? v : 'None');
35 Ext.create('Ext.form.field.File', {
36 renderTo: 'fi-button',
40 'change': function(fb, v){
41 var el = Ext.get('fi-button-msg');
42 el.update('<b>Selected:</b> '+v);
48 afteranimate: function() {
61 Ext.create('Ext.form.Panel', {
65 title: 'File Upload Form',
66 bodyPadding: '10 10 0',
81 emptyText: 'Select an image',
86 iconCls: 'upload-icon'
93 var form = this.up('form').getForm();
96 url: 'file-upload.php',
97 waitMsg: 'Uploading your photo...',
98 success: function(fp, o) {
99 msg('Success', 'Processed file "' + o.result.file + '" on the server');
106 handler: function() {
107 this.up('form').getForm().reset();