title: How to write into a table with Javascript?
body: <pre><code>&lt;Script&gt;
  function getExperience()
  {
      var xp = document.getElementById('txt_XP').value;
      document.getElementByID("plank").innerHTML = xp/30;
  }
  &lt;/Script&gt;
  </code></pre>
  
  <p>So here is my code, and my problem is that I seem to be unable to write over data in a table with the id's planl, oakPlank, teakPlank, and mahoganyPlank. I am thinking that I may be making an obvious mistake to someone who has done this sort of thing before, but I can't seem to catch it. Any help is much appreciated, and here is a snippet of my table, if it helps:</p>
  
  <pre><code>&lt;tr&gt;
      &lt;td&gt;Plank&lt;/td&gt;
      &lt;td id="plankXP"&gt;30&lt;/td&gt;
      &lt;td id="plank"&gt;0&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>EDIT: I didn't realize that this may be pertinent, my bad. This is the form I used to get input, which after putting an alert in to see if it could retrieve the XP, it functioned correctly:</p>
  
  <pre><code>&lt;form name="experience" id="experience_frm" action="#"&gt;
      Experience: &lt;input type="text" name="XP" id="txt_XP"/&gt;
      &lt;input type="submit" value="Go" onclick="getExperience();"/&gt;
  &lt;/form&gt;
  </code></pre>