THANKS!!! VERY EXCELLENT SOLUTION!
duleorlovic 1 year ago
it is not good solution because it share response function, and every variable which is not inicialised with "var" is shared. Try:
temp=1;
alert(temp);
temp++;
It should be alerted at most 2, but it is 3 if there is two simultaneous requests.
What about creating 2 global variables. One for each request(for each button).
chiliconcarne2006 3 years ago
That's great if you only have two buttons.
What if you have a hundred ?
archedmandible 3 years ago 3
THANKS!!! VERY EXCELLENT SOLUTION!
duleorlovic 1 year ago
it is not good solution because it share response function, and every variable which is not inicialised with "var" is shared. Try:
temp=1;
alert(temp);
temp++;
alert(temp);
It should be alerted at most 2, but it is 3 if there is two simultaneous requests.
duleorlovic 1 year ago
What about creating 2 global variables. One for each request(for each button).
chiliconcarne2006 3 years ago
That's great if you only have two buttons.
What if you have a hundred ?
archedmandible 3 years ago 3