Availability: |
| ||||||
Property/method value type: | String primitive | ||||||
JavaScript syntax: | - | defaultStatus | |||||
- | defaultStatus = aString | ||||||
- | myWindow.defaultStatus | ||||||
- | myWindow.defaultStatus = aString | ||||||
Argument list: | aString | A new value for the default status |
As the mouse rolls over active elements in the page, they may write values into the status bar. This is the value that is restored when the mouse rolls out of the object.
Although this is called the defaultStatus value, you can change its setting by writing a new value into the property.
A useful technique is to reset this value to an empty string using a <BODY> or <FRAMESET> onUnload handler.
As an example of a way to use this property, it may be useful to give the user some helpful message when loading a <FORM> into the window.
You can read or write the value in this property.
Because this also works with frames, you can set the value for this to be different according to the frame that the mouse is over. That way, the message can give the user some context sensitive hints on a frame by frame basis. You need to be careful about this because if you define the defaultStatus value in a top level window that contains frames, when the mouse is in the frames, the defaultStatus value will be that which is defined for the frame and not the window. The window's default status will only be displayed when the mouse is over the border in between the frames, hence you must define the defaultStatus value for all frames as well as the window.
If you only need to display a temporary message, then use the status property instead of the defaultStatus property.
The default status value may not be properly restored on some platforms. Macintosh and X-Windows versions of Netscape 3 may exhibit this problem as may other browser and platform combinations.
See also: | Frame object, onMouseOut, onMouseOver, Status line, Window object, Window.status |
Prev | Home | Next |
Window.crypto | Up | Window.detachEvent() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |