teelions
01-22-2007, 08:29 AM
I know that this can be done for iframes but am wondering if so for layers
also.
I have 2 pages: an asp content page that has a html (toc.html) include placed within it.
The content of toc.html is a menu list which is inside a layer called "navcontainer". The content of the asp page is inside a layer named "wrapper". And the include file, toc.html, is inside a layer named "toc" inside "wrapper". So "navcontainer" is inside "toc" which is inside "wrapper".
I want to dynamically resize the menu list to whatever the height is of the "wrapper" layer on each page. Wrapper will differ according to the amount of content on each page.
I tried the following script inside both pages but it didn't work. I even substituted 'navcontainer' for 'toc' but still nothing. Any suggestions?
------------------------------------------
<script type="text/JavaScript">
function tocHeight() {
if(document.getElementById) {
h = document.getElementById('wrapper').offsetHeight;
document.getElementById('navcontainer').style.height = h+"px";
}
else if(document.all) {
h = document.window('wrapper').offsetHeight;
document.all.navcontainer.style.height = h+"px";
}
}
</script>
also.
I have 2 pages: an asp content page that has a html (toc.html) include placed within it.
The content of toc.html is a menu list which is inside a layer called "navcontainer". The content of the asp page is inside a layer named "wrapper". And the include file, toc.html, is inside a layer named "toc" inside "wrapper". So "navcontainer" is inside "toc" which is inside "wrapper".
I want to dynamically resize the menu list to whatever the height is of the "wrapper" layer on each page. Wrapper will differ according to the amount of content on each page.
I tried the following script inside both pages but it didn't work. I even substituted 'navcontainer' for 'toc' but still nothing. Any suggestions?
------------------------------------------
<script type="text/JavaScript">
function tocHeight() {
if(document.getElementById) {
h = document.getElementById('wrapper').offsetHeight;
document.getElementById('navcontainer').style.height = h+"px";
}
else if(document.all) {
h = document.window('wrapper').offsetHeight;
document.all.navcontainer.style.height = h+"px";
}
}
</script>