DHTML : Step 1: Laying the foundations
Dr Benton
The Main Display Area
This area will display the page content itself (in
our example, the welcoming message). When the visitor clicks on one of the menu links, it is this area that will be updated with the
page content called up by the link. By doing this, we do not need to reload the menu.
So it seems that we want to load one page into another one... The Internet Explorer's solution for this is called an IFRAME.
It would have been perfect, but... Navigator does not recognise IFRAMEs. We will need two content areas, called
ieContent and
contentLayer. Of course, only one of them will be displayed, depending on the browser used by the visitor (identified through a JavaScript
test block), but we have to create two areas:
21: <DIV id="ieContent" STYLE="position: absolute; left: 0px; top: 0px; width: 0px; height: 0px; z-index: 6; visibility:
visible;">
22: <IFRAME ID=ieframe FRAMEBORDER=0 WIDTH=0 HEIGHT=0 SCROLLING=NO SRC=""></IFRAME>
23: </DIV>
24:
25: <DIV id="contentLayer" STYLE="position: absolute; left: 0px; top: 0px; z-index: 6; visibility: visible;">
IFRAME, a window within a window An IFRAME is like another window in a window, or a viewport. Combined with the layers, it can be placed wherever you want
and receive any content of your choice. You can even load another page into it if you need.