Displays a dialog box on the screen.
It is available only for client applications.
Syntax
Reference_Syntax.messageBox( STRING param1 [, STRING param2 [, INTEGER param3 [, INTEGER param4 ] ] ] )
Parameters
param1
|
A valid string representing the message
to display.
|
param2
(Optional)
|
A valid string representing the title to
appear in the title bar of the dialog window.
To help protect
against Internet spoofing, the dialog window title begins with the
text “Warning: JavaScript Window -”. The window title that you specify
in this parameter displays after the warning text.
|
param3
(Optional)
|
An integer representing the icon to display
in the dialog box.
|
param4
(Optional)
|
An integer representing the buttons to display.
|
While
param2
,
param3
, and
param4
are
optional, if you want to include a particular parameter, include
all of the preceding parameters. For example, the following JavaScript
is incorrect:
xfa.host.messageBox("Hello World!",3,1);
In
this case you must also specify a value for
param2
for the
JavaScript to execute correctly.
Returns
A
valid integer representing the value of the button pressed by the
user:
-
1
(OK)
-
2
(Cancel)
-
3
(No)
-
4
(Yes)
JavaScript
xfa.host.messageBox("This is a message", "This is a title", 3, 1);
FormCalc
xfa.host.messageBox("This is a message", "This is a title", 3, 1)
|
|
|