I have a ajax call and it sends request every 10ms:
function sendRequest(){
new Ajax.Request(getProgressUrl,
{
method: 'get',
onComplete: function(transport) {
setTimeout(updateCsvExportProgress, 10);
},
onFailure: function(xhr, json) {
}
});
}
And there is button:
<button id="stopIt" onclick="stopAjaxRequest()">STOP</button>
I am wondering how can I stop/abort the ajax call since it is sending the request every 10 ms.
Thanks in advance.