messageBox FunctionDisplays a message box on the screen. Syntaxvalue = messageBox(message, caption, flags); Parameters
ReturnsReturns an value corresponding to the button in the message box that the user clicked:
RemarksUse this function to display a custom message box to the user. The use of this function is preferred over the script functions alert and confirm. ExamplesThe following displays a simple message box. Since no caption is specified, the TQS application's title will be used.
messageBox("That is correct!");The following example asks the user a yes/no question. The value 36 represents 6 (Yes and No buttons) + 32 (Question mark icon). The code checks for the return value 6 to indicate whether Yes was pressed.
if(messageBox("Do you want to play again?",
"Matching", 36) == 6)
{
// play again
} else
{
// do something else
}
|
