Class InputElementTextarea
A textarea object, not a true input but very similar.
Defined in: inputElement.js.
Constructor Attributes | Constructor Name and Description |
---|---|
InputElementTextarea(tag)
|
Method Attributes | Method Name and Description |
---|---|
appendTo(parent)
Appends the textarea and any label to a DOM node
|
|
getValue()
Retrieves the text currently displayed in the textarea.
|
|
onChange(listener)
Attaches an onchange handler to the object
|
|
setLabel(text)
Sets the text for the associated label.
|
|
setSize(width, height)
Sets the size of the textarea
|
|
setTextAlign(text)
Sets the text alignment for the associated label.
|
|
setTooltip(text)
Sets the text to be displayed when a user hovers the mouse over the textarea.
|
|
setValue(text)
Sets the text to be displayed in the textarea.
|
Class Detail
InputElementTextarea(tag)
myComments = new InputElementTextarea('taComments');
- Parameters:
- {string} tag
- The name and id of this object.
Method Detail
appendTo(parent)
Appends the textarea and any label to a DOM node
- Parameters:
- {DOM element} parent
- The DOM node to which this is added
{string}
getValue()
Retrieves the text currently displayed in the textarea.
- Returns:
- {string} The display text
onChange(listener)
Attaches an onchange handler to the object
- Parameters:
- {function} listener
- The event listener to add
setLabel(text)
Sets the text for the associated label.
- Parameters:
- {string} text
- The label for this object.
setSize(width, height)
Sets the size of the textarea
- Parameters:
- {number} width
- The width of the textarea in columns
- {number} height
- The height of the textarea in rows
setTextAlign(text)
Sets the text alignment for the associated label. Default is left.
- Parameters:
- {string} text
- Should be either 'left' or 'right', depending on where you want the label.
setTooltip(text)
Sets the text to be displayed when a user hovers the mouse over the textarea.
- Parameters:
- {string} text
- The display text
setValue(text)
Sets the text to be displayed in the textarea.
- Parameters:
- {string} text
- The display text