Connecting Tech Pros Worldwide Help | Site Map

how use rows[] in IE8

 
LinkBack Thread Tools Search this Thread
  #1  
Old August 27th, 2008, 07:43 AM
Newbie
 
Join Date: Aug 2008
Posts: 1
Default how use rows[] in IE8

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 ?
Reply
  #2  
Old August 27th, 2008, 09:24 AM
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Age: 32
Posts: 2,208
Default

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
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.