title: javascript: get height of div and use it in other div
body: <p>I want to use javascript to get the height of a responsive div, and use the output in another div.
  But I'm no good in javascript at all...</p>
  
  <p>So far I've come up with:</p>
  
  <pre><code>&lt;script language="JavaScript"&gt;
  var offsetHeight = document.getElementById("myDiv").offsetHeight;
  var curr_width = parseInt(offsetHeight.style.height); 
  offsetHeight.style.height = (offsetHeight);
  &lt;/script&gt;
  
  &lt;div id="mydiv"&gt;&lt;/div&gt;
  &lt;div id="offsetHeight" style="top:0px"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>So what I want is that when I resize the document, the height of <code>mydiv</code> is used for the <code>style="top"</code> value...</p>
  
  <p>Anyone who can help me out? Would be wonderful!</p>