namename*
*



Contents  *



Index  *Topic Contents
*Previous Topic: multiple
*Next Topic: name

name

Description

Specifies the name of a window or the frame so it can be targeted from links in other documents.

Syntax

object.name[ = sName]

Settings

This read/write property takes either a window name or frame name, or one of these special values:

window_name A string that specifies a frame.
_blank Loads the link into a new, unnamed window.
_parent Loads the link over the parent. If the frame has no parent, this refers to _self.
_self Replaces the page with the specified link.
_top Loads the link at the topmost level.

Remarks

An exception to the rule, the window keyword must be used to access the name property.

Examples

The following code shows the name property being assigned to the window object.

window.name="MyWindow";

The name property on the window frequently comes from the FRAME definition.

parent.frames[0].name="Left";

The NAME attribute for a window can only be persisted in HTML when defined in a frame within a frameset.

<FRAMESET>
   <FRAME NAME="Left" SRC="blank.htm">
</FRAMESET>

The name property can be assigned using the window open method.

window.open("file.htm","Frame1");

Applies To

FRAME, IFRAME, window


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.