Class: InputElementTextarea

InputElementTextarea

A textarea object, not a true input but very similar.

new InputElementTextarea(tag)

Parameters:
Name Type Description
tag string The name and id of this object.
Source:
Example
myComments = new InputElementTextarea('taComments');

Methods

appendTo(parent)

Appends the textarea and any label to a DOM node
Parameters:
Name Type Description
parent Object The DOM element to which this is added
Source:

disable()

Disables the Textarea object
Source:

enable()

Enables the Textarea object
Source:

getGUI()

Since this does not have a corresponding input, have an explicit method
Source:

getValue() → {string}

Retrieves the text currently displayed in the textarea.
Source:
Returns:
The display text
Type
string

onChange(listener)

Attaches an onchange handler to the object
Parameters:
Name Type Description
listener function The event listener to add
Source:

setLabel(text)

Sets the text for the associated label.
Parameters:
Name Type Description
text string The label for this object.
Source:

setSize(width, height)

Sets the size of the textarea
Parameters:
Name Type Description
width number The width of the textarea in columns
height number The height of the textarea in rows
Source:

setTextAlign(text)

Sets the text alignment for the associated label. Default is left.
Parameters:
Name Type Description
text string Should be either 'left' or 'right', depending on where you want the label.
Source:

setTooltip(text)

Sets the text to be displayed when a user hovers the mouse over the textarea.
Parameters:
Name Type Description
text string The display text
Source:

setValue(text)

Sets the text to be displayed in the textarea.
Parameters:
Name Type Description
text string The display text
Source: