Skip to Main Content
JavaScript: The Definitive Guide, Fourth Edition
book

JavaScript: The Definitive Guide, Fourth Edition

by David Flanagan
November 2001
Intermediate to advanced content levelIntermediate to advanced
936 pages
68h 43m
English
O'Reilly Media, Inc.
Content preview from JavaScript: The Definitive Guide, Fourth Edition

Name

Window.name — the name of a window

Availability

JavaScript 1.0; read/write in JavaScript 1.1

Synopsis

                  window.name

Description

The name property is a string that specifies the name of window. This property is read-only in JavaScript 1.0 and read/write in JavaScript 1.1. The name of a top-level window is initially specified by the name argument of the Window.open( ) method. The name of a frame is initially specified by the name attribute of the <frame> HTML tag.

The name of a top-level window or frame may be used as the value of a target attribute of an <a> or <form> tag. Using the target attribute in this way specifies that the hyperlinked document or the results of form submission should be displayed in the named window.

The initial window opened by the browser and any windows opened with the New Web Browser menu item initially have no name (i.e., name == ""), so these windows cannot be addressed with a target attribute from a separate top-level window. In JavaScript 1.1, you can set the name attribute to remedy this situation.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JavaScript: A Beginner's Guide, Fourth Edition, 4th Edition

JavaScript: A Beginner's Guide, Fourth Edition, 4th Edition

John Pollock
Coding with JavaScript For Dummies

Coding with JavaScript For Dummies

Chris Minnick, Eva Holland

Publisher Resources

ISBN: 0596000480Supplemental ContentCatalog PageErrata