Connecting Tech Pros Worldwide Help | Site Map

how use rows[] in IE8

  #1  
Old August 27th, 2008, 08:43 AM
Newbie
 
Join Date: Aug 2008
Posts: 1
Collection of tr objects (rows) in a table can;t use in IE8.
Expand|Select|Wrap|Line Numbers
  1. var oTable = document.getElementById("tbl");
  2. for (var i = 0; i < oTable.rows.length; i++)
  3. {
  4.     oTable.rows[i].style.fontWeight = "bold";
  5. }
  6.  
run with IE 7,6 or firefox ok. but run with IE8 has error rows is null.
help me. I need use rows. How ?
  #2  
Old August 27th, 2008, 10:24 AM
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,492
Provided Answers: 10

re: how use rows[] in IE8


if this is not triggered by an event you could even use simple CSS
Expand|Select|Wrap|Line Numbers
  1. #tbl {
  2.   font-weight: bold; }
  3. /* tr and td will inherit that value */
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
function for Calculating sum of values in row and coloms of html table by javascript tarunkhatri answers 17 September 18th, 2009 06:44 AM