Skip to content

Instantly share code, notes, and snippets.

@davidecavaliere
Created May 19, 2013 14:31
Show Gist options
  • Save davidecavaliere/5607823 to your computer and use it in GitHub Desktop.
Save davidecavaliere/5607823 to your computer and use it in GitHub Desktop.
aui-io-request example
var io = A.io.request(
url.toString(),
{
autoLoad: false,
cache: true,
method: 'get',
on: {
start: function(event,id) {
console.log('start');
console.log(event);
console.log(id);
},
success: function(event, id, xhr) {
console.log('success');
var data = this.get('responseData');
//console.log(data);
A.one('#slideshowholder').setHTML(data);
},
complete: function(event, id, xhr) {
console.log('complete');
console.log(event);
console.log(id);
console.log(xhr);
},
failure: function(event, id, xhr) {
console.log('failure');
console.log(event);
console.log(id);
console.log(xhr);
},
end: function(event, id) {
console.log("end");
console.log(event);
console.log(id);
}
},
after: {
start: function() {
console.log('after start');
}
}
}
);
io.start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment