Reputation: 51
Assuming I start a looping function via ajax that waits a response from a device (in this case a barcode reader), I need to do an other ajax call if a "Back" button is pressed (while the first function is still running). How could it be done? Using abort don't work because server is still inside looping cycle. Any idea?
Upvotes: 3
Views: 204
Reputation: 150313
Just send another ajax request, you can have multiple ajax request at the same time.
sendFirstAjax();
sendSecondAjax(); // doesn't have to wait the first ajax to complete.
Upvotes: 1