Name
showModalDialog( ) — NN n/a IE 4 DOM n/a
Synopsis
showModalDialog(URL
[,
arguments
[,
features
]])
Displays a special window that remains atop all browser windows until
the user explicitly closes the dialog window. This kind of window is
different from the browser windows generated with the
window.open( )
method. A modal dialog has no
scriptable relationship with its opening window once the dialog
window is opened. All values necessary for displaying content must be
in the HTML document that loads into the window or be passed as
parameters. The modal dialog may then have a script set its
returnValue
property, which becomes the value
returned to the original script statement that opened the modal
dialog box as the returned value of the showModalDialog( )
method.
You can pass arguments to the modal dialog by creating a data
structure that best suits the data. For a single value, a string will
do. For multiple values, you can create a string with a unique
delimiter between values, or create an array and specify the array as
the second parameter for the showModalDialog( )
method. A script in the document loaded into the modal dialog can
then examine the window.dialogArguments
property
and parse the arguments as needed for its scripting purposes. See the
dialogArguments
property for an example.
The third optional parameter lets you set physical characteristics of
the dialog window. These characteristics are specified in a CSS-style
syntax. Dimensions for dialogWidth
,
dialogHeight
, dialogLeft ...
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.