Skip to content

Instantly share code, notes, and snippets.

@jaapz
Created November 11, 2011 12:00
Show Gist options
  • Save jaapz/1357846 to your computer and use it in GitHub Desktop.
Save jaapz/1357846 to your computer and use it in GitHub Desktop.
var req = new Request.JSON({
method: 'get',
url: 'ajax/graphDataRequest.php',
initialDelay: 0,
delay: 60000,
onRequest: function() {
// do stuff
},
onSuccess: function(json) {
// do stuff
},
onFailure: function(xhr) {
console.log("Request failed", xhr);
},
onError: function(text, error) {
console.log(text, error);
}
});
req.startTimer({stationID: $('graph').get('stationID'), 'from': timestamp});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment