I work in rails 2 I have a problem with how to stop the previous ajax call on the same element.
For instance,
I have a category dropdown that is updated based on the type of blog. And I double clicked type, so 2 requests are sent. Before my second req went over if I clicked on a category based on the first response to download subcategories, and now the second answer is for loading categories that have been redesigned and updated. but subcategories are the answer of one of the categories selected from the first categories of answers.
How to stop the previous ajax call sent to select categories.
source share