showModelessDialog method (window)
Creates a modeless dialog and loads the specified document into it.
The showModelessDialog method is similar to the window.open method, but while the showModelessDialog method creates a dialog, the open method creates a new application window.
A modeless dialog looks like a browser window, but behaves differently.
For example, the Find dialog in Internet Explorer is a modeless dialog.- A modeless dialog is always displayed on top of its opener window (but the opener window can get focus as opposed to modal dialogs).
- When a modeless dialog loses focus, its title bar becomes inactive, but the dialog stays above its opener window.
- A modeless window does not appear as a new running application, because it is only a simple window that belongs to the opener application.
Syntax:
You can find the related objects in the Supported by objects section below.
Parameters:
Required. String that specifies the location of the document to display in the modeless dialog. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Optional. Specifies an object with an arbitrary type or a primitive value to pass to the dialog. Use the dialogArguments property to get this value in the dialog. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Optional. String that specifies a comma-separated list of options. Each option is a name, value pair, delimited by a semicolon.
The following options are supported:
|
Return value:
Returns the newly created window object.
Example HTML code 1:
This example creates a modeless dialog and communicates between the opener and the modeless window:
|
|||||
<head> <script type="text/javascript"> function OpenModeless () { if (window.showModelessDialog) { // Internet Explorer showModelessDialog ("modeless.htm", window, "dialogWidth:300px; dialogHeight:200px"); } else { window.open ("modeless.htm", "","width=300, height=200, alwaysRaised=yes"); } } </script> </head> <body> First open a modeless dialog with this button: <button id="modeless_button" onclick="OpenModeless ();">Open a modeless dialog!</button> <br /><br /> You can change the text color of the button with the selection list of the modeless window. </body> |
|||||
|
|||||
Did you find this example helpful?
|
Supported by objects:
Related pages:
External links:
User Contributed Comments