This is a discussion on "childnodes problem" within the JavaScript Forum section. This forum, and the thread "childnodes problem are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
childnodes problem
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
childnodes problem
Hi!
I'm really new to web programming. I've got the following code: <div id = "divrow1" name="divrow1"> <tr id="row1.1" style="display=none;" name="row1.1"> <td> <img id= 'imgrow1.1' src='images/plus.gif' <onclick='changeVis("row1.1", 3);' > Welcome</td> <td>1</td> <td>2</td> <td>3</td> </tr> </div> It's all placed within a <table> tag. div = document.getElementById("divrow1"); Why do I get zero for div.childNodes.length? Thank you |
|
|
|
#2
|
|||
|
|||
|
Re: childnodes problem
To start with your structure is wrong.
You can't just stick <tr> elements inside a <div>. To be strictly correct, you should have a <table> element followed by a <tbody> element and then your <tr> elements. You need to propely close the structure obviously. If you do not, you will get different responses depending on the browser you are using. |
![]() |
| Tags |
| childnode |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| First image problem and inline list problem | konnor5092 | Web Page Design | 8 | Dec 1st, 2007 09:08 |