You are here: Reference > JavaScript > client-side > dialog > properties > isOpen (popup)

isOpen property (popup)

Browser support:
Returns a Boolean value that indicates whether the current popup window is displayed.
Popup windows can be created with the createPopup method and displayed with the show method.


You can find the related objects in the Supported by objects section below.
This property is read-only.

Possible values:

Boolean that indicates the state of the popup window.
One of the following values:
Popup window is displayed.
Popup window is closed.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the isOpen property:
    <script type="text/javascript">
        var popupWindow = null;
        function Init () {
            window.setInterval (UpdateInfo, 200);

        function UpdateInfo () {
            var info = document.getElementById ("info");
            if (popupWindow && popupWindow.isOpen) {
                info.innerText = "popup window is open";
            else {
                info.innerText = "popup window is closed";

        function MakePopup () {
            if (window.createPopup) {        //Internet Explorer
                if (!popupWindow) {
                    popupWindow = window.createPopup ();
                    var popupBody = popupWindow.document.body;

           = "lightblue";
           = "solid black 1px";
                    popupBody.innerHTML = "Click outside to close.";
       (100, 100, 150, 25, document.body);
<body onload="Init ()">
    <input type="button" value="Create a popup window!" onclick="MakePopup ();"/>
    <div id="info"></div>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content