Window.returnValue (Property)

The return value for a modal dialog window.


JScript - 3.0
Internet Explorer - 4.0
Property/method value type:User defined
JavaScript syntax:IEreturnValue
Argument list:aNewValueThe value to be returned when the modal dialog closes

The MSIE browser supports a special kind of window called a Modal Dialog. This is similar to using the open() method to create a new window except that it is forced to always be on the top and you cannot click outside of it to bring focus to another window within the browser.

When the modal window exits, you have the opportunity to store a value in the returnValue property. Since the window is instantiated by a method call, the caller will expect a value to be returned. This value will be null unless you specify something yourself.

Since you can pass arguments into the modal window, this provides a way to transmit user interaction dependent values back to the caller.


See also:Frame object, Window object, Window.showModalDialog()