Index: grid_scroller.js =================================================================== --- grid_scroller.js (revision 13557) +++ grid_scroller.js (working copy) @@ -482,20 +482,22 @@ var heights2 = this.GetHeights(table2_id); var table, the_height, num; - for (var row=0; row heights2[row]) - { + for (var row = 0; row < table1.rows.length; row++) { + if (heights1[row] > heights2[row]) { + // table1 row's height is larger -> adjust table2 row's height the_height = heights1[row]; table = table2; id = table2_id; } else { + // table2 row's height is larger -> adjust table1 row's height the_height = heights2[row]; table = table1; id = table1_id; } - var height_div = document.getElementById(id+'_left_height_'+row); + + var height_div = document.getElementById(id + '_left_height_' + row); + if (height_div) { // the div only exists for FF height_div.style.height = the_height+'px'; height_div.style.width = table.rows[row].cells[0].clientWidth+'px' @@ -507,27 +509,28 @@ } } // IE can't display div as table-cell, but it respects the tr height - table.rows[row].cells[0].style.height = the_height+'px'; - table.rows[row].style.height = the_height+'px'; + + if (document.all) { + $(table.rows[row].cells[0]).height(the_height); + } + + $(table.rows[row]).height(the_height); } } GridScroller.prototype.GetHeights = function(table_id) { + var heights = new Array(); var table = document.getElementById(table_id); - var heights = new Array(); - var height - for (var row=0; row