When I set up the callback array this way, I get 20 in the dialog for all callbacks. I would like to get the index in an array. Is it possible? The callback function expects the callback to have one parameter. I do not control the caller because he is part of an external library. Any help is appreciated.
for (var i = 0; i < 20; i++) {
callbackDB[i] = function(data) {
alert(i);
}
}
source
share