InputBox Method

This method generates a dialog box for user input. Corresponds to the InputBox action.

App.InputBox(Prompt, Title, Value)

Client support

   Newlook Smartclient only.

Use

The dialog box presented to the user displays the Question icon and has OK and Cancel buttons.

Figure 1. Sample Input Box

Parameters

Prompt - (String, Required)

Specifies the message that will display in the body of the input box.

Title - (String, Required)

Specifies the text that will display in the title bar of the input box. To display a blank title bar specify "".

Value - (String, Required)

The input text. This parameter is used to provide a default value for the input box entry field and, for VB Scripts ONLY, return the value entered by the user.

WARNING:

When used within JScript scripts, the InputBox method cannot be used to return the value that the user enters into the entry capable text field. To return the entered value you will need to use this method in a vb script or via the InputBox action in a macro instead.

HelpFile - (String, Optional)

This parameter has been deprecated.

Context - (String, Optional)

This parameter has been deprecated.

Returns

VB Script:

If the OK button is clicked or the user presses ENTER, the InputBox method returns "1" and the Value parameter returns the current text entered in the dialog box. If the user clicks the Cancel button or presses ESC, the method returns "2" and an empty string is assigned to the Value parameter.

JScript:

If the OK button is clicked, the InputBox method returns the string "1". If the Cancel button is clicked the InputBox method returns the string "2".

Applies To

App object

See Also

InputBox Action | SetValue method | MsgBox method


© 2004-2021 looksoftware. All rights reserved.