T
tourerukcom
Hi
i wonder if someone can help. Im trying to add a onclick event to a
cell in a table.
// Display Product Groups
otab.rows.cells[1].innerHTML = x.childNodes[0].nodeValue;
otab.rows.cells[1].id = id;
otab.rows.cells[1].onclick = function() {doList(dept ,id ,0,"S");};
I checked and id increments fine but the onclick event always set to
the last one. For example the last id in the loop is 284 and it seems
all the onclick event has id set to 284???
Help!!
i wonder if someone can help. Im trying to add a onclick event to a
cell in a table.
// Display Product Groups
otab.rows.cells[1].innerHTML = x.childNodes[0].nodeValue;
otab.rows.cells[1].id = id;
otab.rows.cells[1].onclick = function() {doList(dept ,id ,0,"S");};
I checked and id increments fine but the onclick event always set to
the last one. For example the last id in the loop is 284 and it seems
all the onclick event has id set to 284???
Help!!