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> div = document.getElementById("divrow1"); Why do I get zero for div.childNodes.length? Thank you
it's all within a <table> tag: <table id = "table1" border="1"> <tbody> <tr> <th></th> <th>First</th> <th>Second</th> <th>Third</th> </tr> <tr id="row1" name="row1" > <td><img id= 'imgrow1' src='images/plus.gif' onclick='changeVis("row1", 2);' > Israel</td> <td>1</td> <td>2</td> <td>3</td> </tr> <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 Screen</td> <td>1</td> <td>2</td> <td>3</td> </tr> </div> and so on... How can I get the childNodes of the div "divrow1"?