var t = new Pman.Request({
url: baseURL + '/Images/Download/0/myfile.jpg',
params: { .... },
- success : function(data) {
-
- },
- failure : function () {
-
- }
+ success : function(res) {
+ Roo.log(res.data);
+ Roo.log(res.total);
+ ....
+ }
});
</code></pre>
* @param {Object} cfg Configuration object.
* @cfg {String} url Location to download from.
* @cfg {String} method GET or POST (default GET), POST will create a form, and post that into the hidden frame.
-* @cfg {Object/String/Function} (Optional) An object containing properties which are used as parameters to the
+* @cfg {Object/String/Function} params (Optional) An object containing properties which are used as parameters to the
* request, a url encoded string or a function to call to get either.
-*
+* @cfg {Function} success called with ( JSON decoded data of the data.. )
*/
Pman.Request = function(config){
Roo.callback(options.failure, options.scope, [response, options]);
Roo.callback(options.callback, options.scope, [options, false, response]);
if (!options.failure) {
-
+ Roo.MessageBox.hide(); // hide any existing messages..
+ Roo.MessageBox.alert("Error", res.errorMsg ? res.errorMsg : "Error Sending");
}
}
});
\ No newline at end of file