Ninjakreborn Posted October 24, 2006 Share Posted October 24, 2006 [code]function autodivheight (div1, div2) { var divheight = document.div.getElementById('div1').style.height; document.div.getElementById('div2').style.height = divheight; //var divtochange = document.getElementById('div1').style.height; //document.getElementById('div2').style.height = div1;}</script></head><body onload="autodivheight (leftnav, rightcontent);">[/code]It's telling me expected object or something, unexpected object.Am I referencing my div's wrong, those are the id names for the div'sI also tried with the .div. Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted October 24, 2006 Author Share Posted October 24, 2006 I found out what I needed, I just have a question.How can I record the height of an element (for instance: div) using javascript., I need to trap the height of a div into a variable to use with some calculations, how do I do this? Quote Link to comment Share on other sites More sharing options...
fenway Posted October 26, 2006 Share Posted October 26, 2006 clientHeight and/or offsetHeight are useful, but I don't remember what FF does with these. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.