|
||
| Inside Technique : Hiding & Showing Frames Just like standard HTML documents in Internet Explorer 4.0, FrameSets also expose an all collection that allows you to manipulate the size and contents of any frame. This allows you to give the user better control over the layout of the screen. In this example, we demonstrate how the user can selectively display or hide the navigation frame of a frameset. Below demonstrates this with a CSS help area we are working on (please ignore the close button - this area is intended to be viewed in its own window). The user can selectively hide and show the table of contents by clicking on the checkbox.
DescriptionIn the CSS Help page, three frames defined as follows.
The following function is defined when the user clicks on the checkbox:
Code
function toggleContents(el) {
if (el.checked)
parent.document.all.info.cols = "145,*" // Display the table of contents
else
parent.document.all.info.cols = "0,*" // Hide the table of contents
}
© 1997-2000 InsideDHTML.com, LLC. All rights reserved. |