Search
Dialog Constructor
See Also
 






Initializes a new instance of the Dialog class.

Namespace: MindFusion.Common.UI
File: Dialog.js

 Syntax

JavaScript  Copy Code

function Dialog (parent)

 Parameters

parent

HTMLElement. The DOM element to which to append the dialog.

 Remarks

You would either inherit from this class to create your own dialogs or use one of the methods of the Dialog class, which render one of the predefined dialogs. You can also create instances of one of the classes that implement Dialog: ConfirmDialog, InfoDialog, InputDialog.

 Example

The following code creates an input dialog:

JavaScript  Copy Code
// show the dialog
ui.Dialogs.showInputDialog("", "Choose game mode", startGame, document.getElementById("content"), select, "value");

 See Also