Basic Js function to scale two DIV's heights
<p>I want <code>#result</code> to being scaled to <code>#sidebar</code> height if set. If not, leaving <code>#result</code> at its original height. </p>

<p>My code:</p>

<pre><code>window.onload = setDiv;

function setDiv() {
    var e = document.getElementById('sidebar'); // Get the sidebar infos
    var eh = e.offsetHeight // div height
    if ( typeof(eh) == "undefined" || typeof(eh) == null)  { // if sidebar isnt in the page
        alert(eh);
        return true;
    } else {
        var eh = e.offsetHeight // div height
        var d = document.getElementById('result') // Get the result div height
        var dh = d.offsetHeight // div height
        d.style.height = eh + 65 + 'px'; // Set result div height to sidebar height
        alert(d);
        document.write(dh);
        return false;
    }
}
</code></pre>

<p>I don't think HTML/CSS is needed.</p>

<p>Thank you.</p>
