The following properties are available for the
object:window
Property | Description |
|
A reference that returns the object for the browser |
|
A true or false value that indicates whether a window is closed |
|
The text that is displayed in the browser's status bar by default |
|
Returns arguments that were passed into a dialog window, as an array |
|
Sets or returns the height of a dialog window |
|
Sets or returns the x coordinate of a dialog window |
|
Sets or returns the y coordinate of a dialog window |
|
Sets or returns the width of a dialog window |
|
Read-only reference to the object |
|
Read-only reference to the global object |
|
Read-only reference to the object |
|
Returns the number of elements in a collection |
|
The name of the window object |
|
Read-only reference to the object |
|
Specifies whether or not to use off-screen buffering for the document |
|
A reference to the window object that opened this window object |
|
A reference to the parent of the current window object (for use with frames) |
|
Allows a return value to be specified for the event or dialog window |
|
Read-only reference to the global object |
|
A reference to the current window |
|
Text displayed in the browser's status bar |
|
A reference to the top-most window object (for use with frames) |
When using property, method or event names in JavaScript, you must be very careful, as JavaScript is case sensitive, so while
would be a correct reference, defaultStatus
would return an error. In VBScript however, either version would be acceptable!defaultstatus
The
, opener
, parent
, and self
properties are useful when we write code that deals with more than one top
object. As we'll discuss when we talk about the window
collection below, multiple frames
objects can come about when the page we're displaying has multiple frames and when we've explicitly created new windows with the window
method (which we'll also discuss shortly).open
The
, dialogArguments
, dialogHeight
, dialogLeft
and dialogTop
properties can all be used to set the various properties of a dialog window. We take a look at dialogs later in this chapter.dialogWidth
The other two useful properties are
and defaultStatus
. Both of these properties control what is displayed in the status bar of the browser, when the page is first displayed and afterwards respectively.status