- if(fp.getForm().isValid()){
- fp.getForm().submit({
- url: 'file-upload.php',
- waitMsg: 'Uploading your photo...',
- success: function(fp, o){
- msg('Success', 'Processed file "'+o.result.file+'" on the server');
- }
- });
+ var form = this.up('form').getForm();
+ if(form.isValid()){
+ form.submit({
+ url: 'file-upload.php',
+ waitMsg: 'Uploading your photo...',
+ success: function(fp, o) {
+ msg('Success', 'Processed file "' + o.result.file + '" on the server');
+ }
+ });