title: NotFoundError: DOM Exception 8
body: <p>straight to the point:</p>
  
  <pre><code>function dell(a) {
      var id = a.split('');
      var rs_array = ["nr", "ps", "aan", "des", "subs", "del"];
      var r_array = ["artnr", "ps", "aan", "des", "subtots", "del"];
      for (i = 0; i &lt; 6; i++) //ligt aan nummer
      {
          var regels = document.getElementById(rs_array[i]);
          regels.removeChild(document.getElementById(r_array[i] + id[3]));
      }
  }
  </code></pre>
  
  <p>With this code im trying to detele some input elements</p>
  
  <pre><code>for r = 0 to a_rows-1 step 1%&gt;
  &lt;tr id="regels"&gt;
      &lt;td width="auto" id="nr"&gt; 
          &lt;input type="text" name="artid" id="artnr&lt;%=r%&gt;" value="&lt;%=records(1,r)%&gt;" size="6"&gt;
      &lt;/td&gt;
      &lt;td id="ps"&gt;
          &lt;input type="text" name="ps" id="ps&lt;%=r%&gt;" onfocus="this.blur()" value="&lt;%=records(2,r)%&gt;" size="7"&gt;
      &lt;/td&gt;
      &lt;td id="aan"&gt;
          &lt;input type="text" name="aan" id="aan&lt;%=r%&gt;" onkeyup="sub(this.id,this.value);count()"  value="&lt;%=records(3,r)%&gt;" size="2"&gt;
      &lt;/td&gt;
      &lt;td id="des"&gt;
          &lt;input type="text" name="omschr" id="des&lt;%=r%&gt;" value="&lt;%=records(4,r)%&gt;" size="50"&gt;
      &lt;/td&gt;
      &lt;td id="subs"&gt;
          &lt;input type="text" name="subtots" id="subtots&lt;%=r%&gt;" onfocus="this.blur()" value="&lt;%=records(5,r)%&gt;"  size="7"&gt;
      &lt;/td&gt;
      &lt;td id="del"&gt;
          &lt;div id="del&lt;%=r%&gt;" onclick="dell(this.id)" style="cursor:pointer;border:1px black solid;font-size:20px"&gt;-&lt;/div&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;% next
  </code></pre>
  
  <p>This comes out of the database of mine. I'm trying to delete the input elements by giving them a id with a number.
  The strange thing is: I can delete the first row, but after that it says: '<code>NotFoundError: DOM Exception 8</code>' when i try to delete another one.</p>
  
  <p>Please help me. If you need more info about my code or something, you can ask it </p>