tags:

views:

72

answers:

2

I have a div

div id='srch'

that has a computed height of 7000px how do i set the height of the another div to the same on window.load

div id='set_me'
+2  A: 
document.getElementById('set_me').style.height = document.getElementById('srch').offsetHeight +'px';

if the possibility of the srch height will ever change, it will always match

Spooks
+7  A: 
document.getElementById('set_me').style.height = 
    document.getElementById('srch').offsetHeight + 'px';
MooGoo
+1 Same answer as Spooks, but you took the time to add 4 spacebars
jessegavin
if I only had the time.. heh
Spooks