title: JavaScript - Traversing the HTML DOM using childNodes causes errors in Non IE browsers
body: <p>I have the following table being rendered in my browser. It's generated from the server side.</p>
  
  <pre><code>&lt;table id="tblQuestions" class="tblQuestionsContainer" border="0"&gt;
      &lt;tr&gt;
          &lt;td id="1" class="tdQuestion"&gt;Are u an indian citizen ?&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
          &lt;td&gt;&lt;table id="answer-1" border="0"&gt;
              &lt;tr&gt;
                  &lt;td&gt;&lt;input id="answer-1_0" type="radio" name="answer-1" value="1" /&gt;&lt;label for="answer-1_0"&gt;Yes&lt;/label&gt;&lt;/td&gt;&lt;td&gt;&lt;input id="answer-1_1" type="radio" name="answer-1" value="0" /&gt;&lt;label for="answer-1_1"&gt;No&lt;/label&gt;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
          &lt;td id="2" class="tdQuestion"&gt;Do you have a passport ?&lt;/td&gt;
      &lt;/tr&gt;&lt;tr&gt;
          &lt;td&gt;&lt;table id="answer-2" border="0"&gt;
              &lt;tr&gt;
                  &lt;td&gt;&lt;input id="answer-2_0" type="radio" name="answer-2" value="1" /&gt;&lt;label for="answer-2_0"&gt;Yes&lt;/label&gt;&lt;/td&gt;&lt;td&gt;&lt;input id="answer-2_1" type="radio" name="answer-2" value="0" /&gt;&lt;label for="answer-2_1"&gt;No&lt;/label&gt;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Now I am using the following code in my JavaScript to validate the radio button's checked state.</p>
  
  <pre><code> var tblQuestionBoard=document.getElementById("tblQuestions");
    tblAnswer = tblQuestionBoard.rows[1].childNodes[0].childNodes[0]
  </code></pre>
  
  <p>Now tblAnswer should be an object having the Table with id "answer-1"</p>
  
  <p>In IE, I am getting it. But in Mozilla and rest of the browsers I am getting it as undefined.</p>
  
  <p>How to solve this?</p>