var query = {};
var queryString = {};
var temp = null;
for(var i=0;i<2;i++){
temp = i;
query[temp] = new google.visualization.Query(URL+temp);
queryString[temp] = "Select Col"+temp+ " limit 20";
query[temp].setQuery(queryString[temp]);
(function(inIndex){
query[inIndex].send(function(response){
response['displayIndex'] = inIndex;
handleResponse(response);
});
);
})(temp);
}
function handleResponse(response){
// pass the relevant container name to the chart instance.
}
Let me know if there is a better way than this.
Thanks