Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











OBJECT:  Textarea


A Textarea object provides a multi-line field in which the user can enter data and is created with every instance of an HTML <TEXTAREA> tag on a form. These objects are then stored in the elements array of the parent form and accessed using either the name defined within the HTML tag or an integer (with '0' being the first element defined, in source order, in the specified form).

PROPERTIES

defaultValue Property
This property sets or returns a string indicating the initial value of the Textarea object. The value of this property initially reflects the value between the start and end <TEXTAREA> tags. Use of the defaultValue property, which can be done at any time, will override the original value.

Syntax: object.defaultValue[ = "newdefaultvalue"]

form Property
This property returns a reference to the parent Form of the Textarea object.

Syntax: object.form

name Property
This property sets or returns the value of the Textarea object's name attribute.

Syntax: object.name

type Property
Every element on a form has an associated type property. In the case of a Textarea object, the value of this property is always "textarea".

Syntax: object.type

value Property
This property sets or returns the Textarea object's value attribute. This is the text that is actually displayed in the Textarea and can be set at any time with any changes being immediately displayed.

Syntax: object.value

METHODS

blur Method
This method removes the focus from the specified Textarea object.

Syntax: object.blur( )

focus Method
This method gives focus to the specified Textarea object.

Syntax: object.focus( )

handleEvent Method
This method calls the handler for the specified event.

Syntax: object.handleEvent(event)

select Method
This method is used to select and highlight all or a portion of a text in a Textarea element. Used in conjunction with the focus method, this makes it easy to prompt the user for input and places the cursor in the correct place.

Syntax: object.select( )

EVENT HANDLERS

onBlur Event handler
This event handler executes some specified JavaScript code on the occurrence of a blur event (when the Textarea object loses focus).

Syntax: object.onBlur="myJavaScriptCode"

onChange Event handler
This event handler executes some specified JavaScript code on the occurrence of a change event (when the Textarea object loses focus and its value has altered).

Syntax: object.onChange="myJavaScriptCode"

onFocus Event handler
This event handler executes some specified JavaScript code on the occurrence of a focus event (when the Textarea object receives focus).

Syntax: object.onFocus="myJavaScriptCode"

onKeyDown Event handler
This event handler executes some specified JavaScript code on the occurrence of a KeyDown event (when a key is depressed).

Syntax: object.onKeyDown="myJavaScriptCode"

onKeyPress Event handler
This event handler executes some specified JavaScript code on the occurrence of a KeyPress event (when a key is depressed and held down).

Syntax: object.onKeyPress="myJavaScriptCode"

onKeyUp Event handler
This event handler executes some specified JavaScript code on the occurrence of a KeyUp event (when a key is released).

Syntax: object.onKeyUp="myJavaScriptCode"

onSelect Event handler
This event handler executes some specified JavaScript code on the occurrence of a select event (when some text in the Textarea is selected).

Syntax: object.onSelect="myJavaScriptCode"

 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information