Dialog open property
Example
Open the dialog window:
document.getElementById("myDialog").open = true;
Try it »
Definition and Usage
The open property is used to set or return whether the dialog window is open.
This property reflects
If this attribute is specified, it means the dialog window is available and the user can interact with it.
Note:
Browser support





Note: Currently only Chrome Canary and Safari 6 browsers support the open property.
Note: Even if Chrome Canary supports
Syntax
Return the open property:
dialogObject
.open
Set the open property:
dialogObject
.open=true|false
Attribute values
| Value | Description |
|---|---|
| true|false | Specifies whether the dialog window is open
|
Technical Details
| Return Value: | Boolean, returns TRUE if the dialog window is open, otherwise returns FALSE. |
|---|
More examples
Example
Check whether the dialog window is open:
var x = document.getElementById("myDialog").open;
x
The output is:
true
Try it »
Related Articles
HTML Reference Manual: HTML
Dialog Object