Skip to content

Instantly share code, notes, and snippets.

@blowery
Forked from voodootikigod/gist:231066
Created November 17, 2009 16:53
Show Gist options
  • Save blowery/237054 to your computer and use it in GitHub Desktop.
Save blowery/237054 to your computer and use it in GitHub Desktop.
// dojo
dojo.xhrGet({
url: "/dragons",
load: function(data) { /*do something w/ the data */ },
handleAs: "json"
});
// jQuery
jQuery.get("/dragons", function(data, textStatus){
/*do something w/ the data */
}, "json");
// Prototype
new Ajax.Request('/dragons', {
onSuccess: function(response) {
/*do something w/ the data */
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment