2c8595098c
git-svn-id: http://google-refine.googlecode.com/svn/trunk@883 7d457c2a-affb-35e4-300a-418c747d4874
22 lines
512 B
JavaScript
22 lines
512 B
JavaScript
Ajax = {};
|
|
|
|
Ajax.chainGetJSON = function() {
|
|
var a = arguments;
|
|
var i = 0;
|
|
var next = function() {
|
|
if (i <= a.length - 3) {
|
|
var url = a[i++];
|
|
var data = a[i++];
|
|
var callback = a[i++];
|
|
|
|
$.getJSON(url, data, function(o) {
|
|
callback(o);
|
|
next();
|
|
}, "json");
|
|
} else if (i < a.length) {
|
|
var finalCallback = a[i++];
|
|
finalCallback();
|
|
}
|
|
};
|
|
next();
|
|
}; |