Inactive
0
I Use This!

Project Summary

Analyzed 8 days ago. based on code collected 8 days ago.

Prototype based Ajax.ScriptRequest to load JSON data from other domains.

Basic usagenew Ajax.ScriptRequest(url, options);

// Example
new Ajax.ScriptRequest("http://api.flickr.com/services/rest/", {
parameters: {
method:"flickr.tags.getHotList",
format: "json",
api_key: "xyz"
},
onResponse: myResponse,
callbackName: "jsoncallback"
});Extended usagenew Ajax.FlickrRequest(method, options);

new Ajax.FlickrRequest("flickr.tags.getHotList", {
onResponse: myResponse
});Demohttp://script-request.googlecode.com/svn/trunk/index.html

ExtensionsAjax.DeliciousRequest Ajax.FlickrRequest Ajax.YahooImageSearch Ajax.XmlJsonRequest ... Sample extension implementationAjax.FlickrRequest = Ajax.ScriptRequest.extend({
setOptions: function(options){
this.url = "http://api.flickr.com/services/rest/?method=" + this.url;
this.options = {
callbackName: "jsoncallback",
parameters: {
api_key: "xyz",
format: "json"
}
};
}
});

// call your new extension:

new Ajax.FlickrRequest("flickr.tags.getHotList", myCallback);Downloadhttp://script-request.googlecode.com/svn/trunk/scripts/ScriptRequest.js http://script-request.googlecode.com/svn/trunk/scripts/ScriptRequestExtensions.js AuthorMartin Kleppe

Send Mail

Share

In a Nutshell, script-request...

Activity

30 Day Summary

Jan 4 2016 — Feb 3 2016

12 Month Summary

Feb 3 2015 — Feb 3 2016

Community

Ratings

Be the first to rate this project
 
Click to add your rating
   Spinner f6ecff617ec2ba7f559e6f535cad9b70a3f91120737535dab4d4548a6c83576c
 
Review this Project!