I want to do an indefinite number of ajax requests, depending on the number of pass urls as a parameter, I only need to know how to increment the (name) of the variable so that the response does not overlap with the previous one.
Each request will fetch a different html or json object and insert them into different elements of the document, without changing the variable all elements are incremented with the last response of the loop. Obs, putting the third argument 'false', in the open () method; of course, but an alert on the console saying it is not a good practice.
[Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience.
Example of what I'm looking for:
At each iteration I want the variable name to change:
var a = new XHtmlHTTPrequest();
In the next iteration:
var b = new XHtmlHTTPrequest();