Window.showDialog

Syntax

showDialog (left: Number, top: Number, parentWindow: Boolean)

Parameters

left.. Distance from the left edge (pixels).

top. Distance from the top edge in pixels.

parentWindow. Parent window.

Description

The showDialog method shows a dialog box.

Comments

A dialog box is used to display information and (or) get user response.

If method parameters are not defined the dialog box is displayed at the center.

Example

To execute the example, connect the PP.js components library and the PP.css visual styles table. The icon.png file is required. See below JavaScript code for creating the Window component displayed as a dialog box.

<script type="text/javascript">

    //Create the Window component

    var win = new PP.Ui.Window({

        ParentNode: document.getElementById("wnd"),

    //Title

        Caption: "Foresight Analytics Platform",

    //Image

        CaptionIcon: "icon.png",

    //Content

        Content: "Dialog Box",

        Height: 200,

        Width: 350,

     });

    //Open dialog box

    win.showDialog();

</script>

After executing the example the HTML page displays the following dialog box:

The dialog box is displayed in the center as parameters of the showDialog method are not defined.

See also:

Window