I\'m working with a bit of html and Javascript code that I\'ve taken over from someone else. The page reloads a table of data (via an asynchronous request) every ten seconds
You do, indeed, need to implement a closure here. This should work (let me know - I didn't test it)
var blah = xmlres.getElementsByTagName('blah');
for(var i = 0; i < blah.length; i++) {
var td = document.createElement('td');
var select = document.createElement('select');
select.setAttribute("...", "...");
select.onchange = function(s,c,a)
{
return function()
{
onStatusChanged(s,c,a);
}
}(select, callid, anotherid);
td.appendChild(select);
}