Window.setZOptions() (Method)

Define the window stacking behavior.

Availability:

JavaScript - 1.2
Netscape - 4.0
Property/method value type:undefined
JavaScript syntax:NmyWindow.setZOptions(anOptionValue)
NsetZOptions(anOptionValue)
Argument list:anOptionValueOne of a range of possible settings for the feature

When you call the window.open() method, there are several feature values that can be used to control the Z-Ordering of the windows. This method provides a way to modify the settings of the Z-Ordering after the window has already been created.

The option value should be one of the following:

FeatureDescription
alwaysRaisedThe window should always be at the top of the stack of windows even when it does not have input focus.
alwaysLoweredThe window should always be at the bottom of the stack of windows even when it does have the input focus.
z-lockThe window should always be at the same Z position in the stack of windows regardless of which window has the focus.
emptyThe window exhibits normal stacking behavior; it is brought to the top when it has the focus.

These options are spelled the same as they are when you use them in the window.open() method. Naturally, they are mutually exclusive and you can use only one of them at a time.

With this special Netscape Navigator functionality and some careful use of the window.open() method, you can effectively simulate the same behavior as that of the MSIE supported modal window. You will need to use global variables and intra-window method calls to pass arguments, however.

Warnings:

See also:UniversalBrowserWrite, Window.showModalDialog()