Hey, I'm not as familiar with JavaScript as I'd like to be so I need a little bit of help with a problem I've got. I've got a table that I need to cycle through and gather what is on the inside of each cell, and store them into something like an array.
The table has an undetermined amount of rows (they can be created by the user) but it has 8 cells within each row I need to get the contents out of. I'd like to put it all into an array, something like this:
- var aVariable = new Array();
-
aVariable[0] = "/boot|ext3|1234|no|no|-|-|-";
Then I need to take each string in the array and break it apart. I don't really need help with this, I've got that figured out, but I just can't figure out how to cycle through the table rows and cells to put the information into the array. So far I've come up with something like this:
- for (var x = 1; x < totalHD; x++) {
-
var theTableID = document.getElementById("hdpart-" + x);
-
var theTableRow = theTableID.tBodies[0].getElementsByTagName("tr");
-
var theTableCell = theTableID.tBodies[0].theTableRow.getElementsByTagName("td");
-
-
-
-
}
totalHD is the number of tables, then within those tables it needs to go through each row and collect the information from each cell. If anyone has any suggestions, I'd really appreciate any help. Thanks!