So what is _parent then? (was Re: _parent addressing)

Jordan Reiter corrected a mistake of mine - thanks. As I had
mentioned, I'm rather new to frames and had just tried to
learn some basics from the 4.0 specs; I think that my error
about _parent can happen to others in the same situation as
well, so maybe the wording in the specs should be improved.
The current draft has the following description of reserved
target names:

---------- quote ----------
_blank 
    The user agent should load the designated document in a
    new, unnamed window. 
_self 
    The user agent should load the document in the same frame
    as the element that refers to this target. 
_parent 
    The user agent should load the document into the immediate
    FRAMESET parent of the current frame. This value is
    equivalent to _self if the current frame has no parent. 
_top 
    The user agent should load the document into the full,
    original window (thus cancelling all other frames). This
    value is equivalent to _self if the current frame has no
    parent. 
---------- /quote ----------

Unfortunately it doesn't say what exactly a FRAMESET parent
is, not to mention the immediate one (are there other than
immediate parents anyway?), and why it matters whether nested
framesets are defined in a single file or in several ones.
Does anyone have a suggestion for an explanation that could
be used? Perhaps it would also be useful to illustrate things
with an example where _self, _parent and _top all lead to
different results.



As a first idea for such an example, here's something based
on Jordan's suggestion how to reach the effect I talked about
in my earlier message. There are three files:

frameset.html:
	<FRAMESET ROWS="50,*">
		<FRAME SRC="upper.html">
		<FRAME SRC="welcome.html" NAME="main">
	</FRAMESET>

upper.html:
	<FRAMESET COLS="*,500">
		<FRAME SRC="getmenu.html">
		<FRAME SRC="logo.gif">
	</FRAMESET>

getmenu.html:
	<BODY>
	<A HREF="menu.html" TARGET=x>Show menu ...</A>
	</BODY>

frameset.html splits the screen in two frames; the upper one
contains upperframe.html, so it gets divided in two itself.
The initial screen thus looks like this:

	-------------------------------------------
	| Show menu ... |          (logo)         |
	-------------------------------------------
	|                                         |
	|                                         |
	|            (welcome text)               |
	|                                         |
	|                                         |
	-------------------------------------------

If x is ...     the menu appears in ...
    "_top"        the full window
    "_parent"     the combination of the two upper frames
    "_self"       only the left upper frame

____  |__|   / Holger   //       mailto:wahlen@ph-cip.uni-koeln.de  ____
      |  |/|/  Wahlen  //  http://www.ph-cip.uni-koeln.de/~wahlen/

Received on Saturday, 2 August 1997 15:50:24 UTC