The best way to do this is probably using something like this:
function addToTable(tblName) {
var tbl = document.getElementById(tb
var tblBody = tbl.getElementsByTagName("
for (t=0; t<xxx; t++) { // pseudocode -- replace xxx with a counter for the number of new rows
var newRow = document.createElement("TR
newRow.innerHTML = something; // replace something with the entire new row
tblBody.appendChild(newRow
}
}
I've used the innerHTML property because the information is coming down as HTML. My preference is to return the data as XML and then parse it into individual cells. In that situation, you can keep adding new TD elements, and appending text nodes to them containing the information coming back. One big advantage here is that you don't need to return redundant data, such as the rowClass style. Just add the style in the loop, above.
}
Main Topics
Browse All Topics





by: HonorGodPosted on 2008-02-08 at 05:56:23ID: 20850041
Hopefully this helps
Select allOpen in new window