title: javascript delete clone node parent table
body: <p>I am trying to delete the parent of a clone node in JavaScript because when i restore the saved table it creates a duplicate of the same table below the original. So I need to delete the original table and just display the child table.</p>
  
  <pre><code>function Save(){
  var table = document.getElementById("sudoku");
  clone = table.cloneNode(true);  
  }
  //Create Restore Function
  function Restore(){
  document.getElementById("sudoku").parentNode.appendChild(clone);
  table.parentNode.removeChild("table");
  }
  </code></pre>
  
  <p>I have also tried this method I found on here on another thread but when I try use it stops the rest of my javascript working</p>
  
  <pre><code>document.getElementById("sudoku").parentNode.removeChild(document.getElementById‌​("sudoku"));
  </code></pre>
  
  <p>thanks in advance</p>