Roo.log("creating form?");
+ this.form = new FormData();
+ /*
var b = Roo.get(document.body);
this.form = b.createChild({
tag: 'form',
target : this.newWindow ? '_new' : this.csvFrame.id,
enctype : 'multipart/form-data'
});
+ **/
//
// if(this.doctype == 'pdf'){
// this.pdfEmbed = b.createChild({
Roo.log(this.params);
for(var i in this.params) {
-
+ this.form.append(i, this.params[i]);
+ /*
var el = this.form.createChild( {
ns : 'html',
tag : 'input',
name : i,
value : this.params[i]
});
+ */
+
+ }
+ var req = new XMLHttpRequest();
+ req.open(this.method, this.url);
+
+ var _t = this;
+ req.onload = function( ev )
+ {
+ if (req.status == 200) {
+ _t.success ? _t.sucess() : '';
+ } else {
+ _t.failure ? _t.failure() : '';
+ }
}
+ req.send(this.form);
+ /*
(function() {
this.submit = true;
this.form.dom.submit();
this.cleanup.defer(this.timeout || 30000,this);
}).defer(100, this);
-
+ */
}
// private - clean up download elements.
cleanup :function()
{
- Roo.log('cleanup?');
+ /* Roo.log('cleanup?');
if (this.form) {
this.form.remove();
this.form= false;
Roo.get(this.csvFrame).remove();
this.csvFrame= false;
}
+ */
},