I have been trying to play with a script i grabbed online but what i dont know what to do is point to the Specific Div i need....
- Code: Select all
<script language="javascript">
dynheight=function(){
var divs,contDivs,maxHeight,divHeight,d,div2;
divs=document.getElementsByTagName('mycontent');
contDivs=[];
for(var i=0;i<divs.length;i++){
if(/\bcontainer\b/.test(divs[i].className)){
d=divs[i];
contDivs[contDivs.length]=d;
// determine height for <div> element
if(d.offsetHeight){
divHeight=d.offsetHeight;
}
else if(d.style.pixelHeight){
divHeight=d.style.pixelHeight;
}
}
div2=document.getElementsByTagName('layer2');
div2.style.height=divHeight;
window.onload=function(){
if(document.getElementsByTagName){
dynheight();
}
}
</script>
What i ultimately need it to do is look for the height for <div id="mycontent"> and apply the same height to <div id="layer2">.
I'm afraid no other work around will work for what i need, so I'm wondering if someone can help to get this script working.
Thanx



