Window.defaultStatus (Property)

A property containing the text displayed in the status bar.


JavaScript - 1.0
JScript - 1.0
Internet Explorer - 3.02
Netscape - 2.0
Opera - 3.0
Property/method value type:String primitive
JavaScript syntax:-defaultStatus
-defaultStatus = aString
-myWindow.defaultStatus = aString
Argument list:aStringA 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.


See also:Frame object, onMouseOut, onMouseOver, Status line, Window object, Window.status