Click to See Complete Forum and Search --> : Another ie vs. firefox issue... updating cells


AaronBratcher
12-28-2005, 02:37 PM
I have a function that goes down the list of rows in an HTML table and enters the row number into the first column. (because I have some moveUp/moveDown arrows that the user can click and i want to save new order)

here is my function that works on IE, but not on fireFox 1.5:

function reorderRows() {
var tbl = document.getElementById("tblList");
var count = 1;
for (var i=0; i<tbl.rows.length; i++) {
tbl.rows[i].cells[0].innerText = count;
count++;
}
}

Any ideas on why this isn't working on fireFox? Thanks.

AaronBratcher
12-28-2005, 03:44 PM
More info...

if I put in alert(tbl.rows[i].cells[0].innerText) before my assignment, it shows "undefined" even tho there is clearly some text already there.

It also appears to work on Safari just fine too.

AaronBratcher
12-28-2005, 03:54 PM
Found the problem... fireFox cannot read from the innerText attribute... only from the innerHTML attribute.