Hi,
Here is the problem which i am facing. I am trying to delete rows (using nodes) containing XML data. I am doing this to add new set of data from XML file by using a dropdown selection.
I am using the below code.(This is just a part of the code)
tab.childNodes refers to all the <tr> tags. Though i am referring to all the rows in the loop, i am able to delete only alternate rows in the table in IE and the other alternate rows get deleted in firefox.
I need to delete all the rows. Can someone help me out with this?
Here is the problem which i am facing. I am trying to delete rows (using nodes) containing XML data. I am doing this to add new set of data from XML file by using a dropdown selection.
I am using the below code.(This is just a part of the code)
Code:
tab = document.getElementById('maintable').getElementsByTagName("tbody")[0];
for(i=0;i<tab.childNodes.length;i++) {
tab.removeChild(tab.childNodes[i]);
}
I need to delete all the rows. Can someone help me out with this?
Comment