alert(message, [title], [icon], [ownerWindow])

Description:

Displays a dialog window with a specified error message and an error icon.

Parameters:

Name Type Default Description

message

string

A message to be displayed in the dialog window

[title]

string

"Message"

Dialog window title bar text

[icon]

MessageIcon

MessageIcon.Info

Icon to show in the dialog window.

Valid value are:

  • MessageIcon.Error
  • MessageIcon.Info
  • MessageIcon.Warning
  • MessageIcon.Question

[ownerWindow]

Window

null

If set, the message dialog window will attempts to be centered at specified window

Returns:

Does not return a value

Type: void

Examples:

Simple usage with only one parameter:

alert("File name is invalid. Please try again");

Usage example when passing all parameters:

alert("File name is invalid. Please try again","Invalid File", MessageIcon.Warning, this);