Search
ModalResult Enumeration
See Also
 






Represents the return value of a modal dialog.

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

 Syntax

JavaScript  Copy Code

// enum
ModalResult = {}

 Members

  Member name Value Description

Cancel

2

The dialog was closed using the Cancel button.

None

0

Default value.

OK

1

The dialog was closed using the OK button.

 Example

The following code checks the result of a Dialog being closed in a callback method:

JavaScript  Copy Code

// show the dialog
ui.Dialogs.showConfirmDialog("Elapsed Time" "Do you want to continue?", warnUser, document.getElementById("content"), "standard");


function warnUser(result, elapsedTime)
{
 if (result == ui.ModalResult.Cancel) return;

  
 alert("You have played this game for " + elapsedTime + "minutes!);
 
}

 See Also