T
Teelions
I know that this can be done for iframes but am wondering if it can be
also done for layers.
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 placed 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 within the asp page, "navcontainer" is
inside "toc" which is inside "wrapper".
I want to dynamically resize the height of the menu list, on page load,
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 done for layers.
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 placed 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 within the asp page, "navcontainer" is
inside "toc" which is inside "wrapper".
I want to dynamically resize the height of the menu list, on page load,
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>