title: Adding <TR> to a <TABLE> with .appendChild
body: <p>Everytime I try to enter a new cell to the table it doesn't add the text in the <strong>bowlersName</strong> value. Is there something wrong with my Javascript code? It says "undefined". </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      /* &lt;![CDATA[ */
  
      function addBowler() {
          var newBowler = document.getElementsByName('bowlersName').value;
          var tr = document.createElement('tr');
          var td = tr.appendChild(document.createElement('td'));
          td.innerHTML = newBowler;
          document.getElementById("bowlerList").appendChild(tr);
      }
      /* ]]&gt; */
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;!-- HEADER 1 &amp; 2 --&gt;
      &lt;h1&gt;Central Valley Lanes&lt;/h1&gt;
      &lt;h2&gt;2008 Bowling Teams&lt;/h2&gt;
      Bowler's name &lt;input type="text" name="bowlersName" size="15" /&gt;&lt;input type="button" value="Add Bowler" onclick="addBowler()" /&gt;
  
      &lt;h2&gt;Team Roster&lt;/h2&gt;   
      &lt;form action="FormProcessor.html" method="get"&gt;
          &lt;table border="1" id="bowlerList"&gt;
              &lt;tr&gt;
                  &lt;td id="empty"&gt;Your team roster is empty&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
          &lt;br /&gt;
          &lt;input type="button" value="Submit Roster" /&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>