April 17, 2000 - The name Property
April 17, 2000|
The name Property
Tips: April 2000
Yehuda Shiran, Ph.D.
nameproperty (IE3+, N2+). We can also set the
nameproperty of a frame or window (IE3+, N3+). Let's take a look at the following HTML document (showname.html):
Take a look at the following links:
<A HREF="showname.html" TARGET="_blank">A New Window</A> <A HREF="showname.html" TARGET="first">First Window</A> <A HREF="showname.html" TARGET="second">Second Window</A> <A HREF="showname.html" TARGET="third">Third Window</A>
The document showname.html consists of a script that displays the name of the window in an alert dialog box. Go ahead and test these links:
name property belongs to the
window object. It can be used with any window object, including a frame. For example, the following statement sets the name of a frame window:
parent.frames.name = "right";
When working with frames, it's easy to access various levels of the window hierarchy. For more details, refer to Window References (November 7, 1999).
Learn more about windows creation and usage in Tutorial 1, Working with Windows.