If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
I wrote the code below for clearing out a row in a table. The problem is this function is very sporadic on how it works and never does it quite right. Does anyone know a better way of doing this? I'm trying to avoid innerHTML since its not in the W3C DOM spec.
Code:
function clear(obj) {
group = obj.childNodes;
for (i = 0; i < group.length; i++) {
obj.removeChild(group[i]);
}
}
edit: One more thing, one of the cells holds another table inside it and that's where I seem to run into problems.