var o = this.options;
var method = this.getMethod();
var isPost = method == 'POST';
- Roo.log(o);
- Roo.log(this.form.isValid());
if(o.clientValidation === false || this.form.isValid()){
- Roo.log('got here');
+
if (this.form.progressUrl) {
this.form.findField('UPLOAD_IDENTIFIER').setValue(
(new Date() * 1) + '' + Math.random());
url:this.getUrl(!isPost),
method: method,
params:isPost ? this.getParams() : null,
- isUpload: this.form.fileUpload
+ isUpload: this.form.fileUpload,
+ formData : this.form.formData
}));
this.uploadProgress();
}else if (o.clientValidation !== false){ // client validation failed
- Roo.log('got fail??');
this.failureType = Roo.form.Action.CLIENT_INVALID;
this.form.afterAction(this, false);
}
}
var ret = false;
try {
- ret = Roo.decode(response.responseText);
+ var rt = response.responseText;
+ if (rt.match(/^\<!--\[CDATA\[/)) {
+ rt = rt.replace(/^\<!--\[CDATA\[/,'');
+ rt = rt.replace(/\]\]--\>$/,'');
+ }
+
+ ret = Roo.decode(rt);
} catch (e) {
ret = {
success: false,