Search
InputDialog Class
See Also
 






Represents a modal Dialog box, displaying a custom input control.

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

 Syntax

JavaScript  Copy Code

// class
InputDialog.prototype = {}

 Example

The following code creates a new instance of the InputDialog class:

JavaScript  Copy Code

// create a custom input for the input dialog
var select = document.createElement("select");

var option = document.createElement("option");
option.value = 0;
option.innerHTML = "Relaxed";
select.appendChild(option);

option = document.createElement("option");
option.value = 1;
option.innerHTML = "Timed";
select.appendChild(option);

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


function startGame(result, mode)
{
 if (result == ui.ModalResult.Cancel) return;
        ...........
        ...........
}

 Inheritance Hierarchy

MindFusion.Common.UI.Control
    MindFusion.Common.UI.WindowBase
        MindFusion.Common.UI.Window
            MindFusion.Common.UI.Dialog
                MindFusion.Common.UI.ConfirmDialog
                    MindFusion.Common.UI.InputDialog

 See Also