search

goog.ui.Prompt

Provided By
Extends
All Implemented Interfaces

Creates an object that represents a prompt (used in place of javascript's prompt). The html structure of the prompt is the same as the layout for dialog.js except for the addition of a text box which is placed inside the "Content area" and has the default class-name 'modal-dialog-userInput'

new Prompt( promptTitle, promptBody, callback, opt_defaultValue, opt_class, opt_useIframeForIE, opt_domHelper )

Parameters
promptTitlestring

The title of the prompt.

promptBody(string|goog.html.SafeHtml)

The body of the prompt. String is treated as plain text and it will be HTML-escaped.

callback(Function|null)

The function to call when the user selects Ok or Cancel. The function should expect a single argument which represents what the user entered into the prompt. If the user presses cancel, the value of the argument will be null.

opt_defaultValuestring=

Optional default value that should be in the text box when the prompt appears.

opt_classstring=

Optional prefix for the classes.

opt_useIframeForIEboolean=

For IE, workaround windowed controls z-index issue by using a an iframe instead of a div for bg element.

opt_domHelper(goog.dom.DomHelper|null)=

Optional DOM helper; see goog.ui.Component for semantics.

Instance Methods

Instance Properties