title: What causes an hierarchy request error when trying to move an svg from one div to another?
body: <p>I am trying to move an svg from one div to another.  <a href="https://stackoverflow.com/questions/7555442/move-an-element-to-another-parent-after-changing-its-id">This stack question</a> offered this solution which I tried.</p>
  
  <p><code>document.getElementById("LightBoxDiv").appendChild(svgId+"V");</code></p>
  
  <p>When I tried this, I received an hierarchy request error.  <a href="https://stackoverflow.com/questions/1256394/what-exactly-can-cause-an-hierarchy-request-err-dom-exception-3-error">This stack question</a> suggested several things which might be the cause.  I cannot tell that I have any of those things, but am not sure.  Bot my div's are in the body element and are not nested within one another, however, one of the div's was only a few lines before created dynamically with javascript.  Here's the script I am using to create that div.</p>
  
  <pre><code>var lightboxdiv = document.createElement('div');
  lightboxdiv.id = "LightBoxDiv";
  document.body.appendChild(lightboxdiv);
  document.getElementById("LightBoxDiv").style.display="block";
  document.getElementById("LightBoxDiv").style.position="fixed";
  document.getElementById("LightBoxDiv").style.overflow="hidden";
  document.getElementById("LightBoxDiv").style.padding="5%";
  document.getElementById("LightBoxDiv").style.top=0;
  document.getElementById("LightBoxDiv").style.left=0;
  document.getElementById("LightBoxDiv").style.width="100%";
  document.getElementById("LightBoxDiv").style.height="100%";
  document.getElementById("LightBoxDiv").style.background="white";
  document.getElementById("LightBoxDiv").style.zIndex="1001";
  document.getElementById("LightBoxDiv").setAttribute("class","dotouch");
  
  document.getElementById("LightBoxDiv").appendChild(svgId+"V");
  </code></pre>
  
  <p>The last line is the one that throws the error.  Any idea what I've done to cause the error?  How might I go about fixing it.</p>
  
  <p>Thanks, --christopher</p>