Using the Query object in the Google Visualization API, I need to find a way to abort a request. I set up the query normally:
var qMyQuery=new google.visualization.Query('http://myurl');
qMyQuery.send(queryDoneCallbackFunctionName);
I have tried the .abort method, but that only applies to regularly refreshing data. I have also tried setting qMyQuery=null, but that didn’t do anything.
I cannot simply discard the data when it is returned to the callback… the point of this is to stop a very lengthy query on the server, if requested by the user.
Any suggestions? Thanks.
The simplest solution would seem to be to send the request to google manually using a custom XHR object, jQuery, ExtJS, etc. Then you would have full power to cancel the request on command from a user through button click handlers or whatever you would like.
Google’s visualization query module does allow it to display errors automatically to the user in the chart DIV, but otherwise, can’t you just use your own XHR object?
Either build a custom XHR object, use jQuery, ExtJS Ajax, or something of the sort.