window.prompt()
Returns: string
- message entered by the user in the prompt field or default value if nothing entered.
The following are additional simple alerts supported by UXP
- confirm()
- alert()
Since: v7.0.0 Displays a Prompt message dialog putting the application in a modal state while not blocking the Javascript thread and still allowing processing of events in the main event loop.
UXP behaviour is different from the standard behaviour of blocking the javascript thread of execution until the dialog has been dismissed.
Param | Type | Description |
---|---|---|
message | string | A string of text to display to the user. |
prompt | string | Default value for the field. |
Example
Copied to your clipboard// Below prompt function has 2 params// "Enter your name: " - Message to display// "Adobe" - Default value that will be present in the Prompt pop-up at launchprompt("Enter your name: ","Adobe");