JavaScript

{dialog.object}addWatermarkToDropdown

IN THIS PAGE

Syntax

{dialog.Object}.addWatermarkToDropdown(controlName,waterMarkText)

Arguments

controlNamestring

The name of the dropdown control.

waterMarkTextstring

The watermark text to display (for example, Select a value...).

Description

Adds a simulated watermark (placeholder) to an HTML Select (dropdown) control. HTML Select controls do not normally support watermarks (placeholders). With this method, you can add a simulated watermark to an HTML Select control.

Discussion

addWatermarkToDropdown() simulates a placeholder/watermark for a dropdown by applying client-side behavior to the rendered HTML Select control.

Call addWatermarkToDropdown() after the control has been rendered (for example, in an event that runs after the component is displayed).

Example

Add a watermark to a dropdown control named country:

{dialog.object}.addWatermarkToDropdown('country','Select a country...');

See Also