Skip to content

Instantly share code, notes, and snippets.

@fabiobruna
Last active August 29, 2015 14:05
Show Gist options
  • Save fabiobruna/f1b3786b18c89b21a548 to your computer and use it in GitHub Desktop.
Save fabiobruna/f1b3786b18c89b21a548 to your computer and use it in GitHub Desktop.
JS afvangen, varianten. Uitzoeken.
Ext.Ajax.request({
url: 'bestandje.ofzo',
// method: 'POST',
params: {
a: a,
b: b
},
success: function(xhr){
var jResponse = Ext.decode(xhr.responseText);
if (jResponse.success === true) {
if (!Ext.isIE) console.log('success::successful');
} else {
if (!Ext.isIE) console.log('success::failed');
}
},
failure: function(error) {
if (!Ext.isIE) console.log('failure'); // ajax error
},
callback: function(o, r, n){
// Nog iets?
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment