Created
May 19, 2013 14:31
-
-
Save davidecavaliere/5607823 to your computer and use it in GitHub Desktop.
aui-io-request example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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