Window.showModalDialog()

Diese Übersetzung ist unvollständig. Bitte helfen Sie, diesen Artikel aus dem Englischen zu übersetzen.

Unerwünscht
Dieses Feature wurde aus den Webstandards entfernt. Obwohl manche Browser es immer noch unterstützen, wird es zukünftig wegfallen. Es sollte daher nicht mehr in alten oder neuen Projekten verwendet werden. Webseiten oder Webapps, die es benutzen, funktionieren möglicherweise irgendwann nicht mehr korrekt.

Die Funktion Window.showModalDialog() erzeugt eine modale Dialog-Box, welche das übergebene HTML DoKument enthält und zeigt diese an.

Dieses Feature fällt demnächst weg. Bitte korrigieren Sie ihre Webseiten und Applikationen.

Support has been removed in Chrome 37. But they have  added a temporary Enterprise Policy setting to re-enable showModalDialog. In May 2015 this setting will be removed and showModalDialog() will be completely removed from Chrome.

Mozilla has announced that it will remove support for this method (Bug 981796). Regarding timing, it shouldn't be before Firefox 39. This means that the function will be around until around mid-June 2015. It also means that for enterprise you can switch to using ESR 38 builds, which will have the function into mid 2016.

Syntax

returnVal = window.showModalDialog(uri[, arguments][, options]);

where

  • returnVal is a variant, indicating the returnValue property as set by the window of the document specified by uri.
  • uri is the URI of the document to display in the dialog box.
  • arguments is an optional variant that contains values that should be passed to the dialog box; these are made available in the window object's window.dialogArguments property.
  • options an optional string that specifies window ornamentation for the dialog box, using one or more semicolon delimited values:
Syntax Description
center: {on | off | yes | no | 1 | 0 } If this argument's value is on, yes, or 1, the dialog window is centered on the desktop; otherwise it's hidden. The default value is yes.
dialogheight: height Specifies the height of the dialog box; by default, the size is specified in pixels.
dialogleft: left Specifies the horizontal position of the dialog box in relation to the upper-left corner of the desktop.
dialogwidth: width Specifies the width of the dialog box; by default, the size is specified in pixels.
dialogtop: top Specifies the vertical position of the dialog box in relation to the upper-left corner of the desktop.
resizable: {on | off | yes | no | 1 | 0 } If this argument's value is on, yes, or 1, the dialog window can be resized by the user; otherwise its size is fixed. The default value is no.
scroll: {on | off | yes | no | 1 | 0 } If this argument's value is on, yes, or 1, the dialog window has scroll bars; otherwise its size is fixed. The default value is no.

Hinweis: Firefox does not implement the dialogHide, edge, status, or unadorned arguments.

Browser Kompatibilität

Eingeführt durch Microsoft Internet Explorer 4. Support hinzufgefügt zu Firefox in Firefox 3 (deprectated in Fx 28), und zu Safari in Safari 5.1.

Beispiele

Probieren Sie showModalDialog() aus.

Notes

showModalDialog() is currently being standardized as part of HTML5. The third argument (for additional options) is not present in the HTML5 version, and is (safely) ignored by both Safari and Chrome.

Spezifikation

Siehe auch

Schlagwörter des Dokuments und Mitwirkende

 Mitwirkende an dieser Seite: Dr4K4n
 Zuletzt aktualisiert von: Dr4K4n,