Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

<TEXTAREA ...>

Usage Recommendation
use it if you use Forms

  • NAME: name of this form field
  • COLS: how many characters wide
  • ROWS: how many rows
  • WRAP: how to wrap the text
  • READONLY: don't let the user change the contents of the field
 
  • DISABLED: don't let the user do anything with this field
  • TABINDEX: tab order
  • LANGUAGE: scripting language
  • onChange: Script to run when the user has changed the textarea
  • onKeyPress: script to run when a key is pressed

<TEXTAREA ...> indicates a form field where the user can enter large amounts of text. In most respects, <TEXTAREA ...> works like an <INPUT ...> field. It can have a name, a default value, script events such as onChange, and is sent to a CGI as a name/value pair. One main difference is that <TEXTAREA ...> is a container tag: it has a start tag ().

In its simplest form, <TEXTAREA ...> requires the NAME, COLS and ROWS attributes, and nothing between <TEXTAREA ...> and </TEXTAREA>.

<FORM ACTION="../cgi-bin/mycgi.pl" METHOD=POST>

your comments:<BR>
<TEXTAREA NAME="comments" COLS=40 ROWS=6></TEXTAREA>

<P><INPUT TYPE=SUBMIT VALUE="submit">
</FORM>

gives us this form:

your comments:

The contents between <TEXTAREA ...> and </TEXTAREA> are used as the default value.

<FORM ACTION="../cgi-bin/mycgi.pl">

your response:<BR>
<TEXTAREA NAME="comments" COLS=40 ROWS=6>
John said
: I think it's a great idea
: but it needs more thought
</TEXTAREA>

<P><INPUT TYPE=SUBMIT VALUE="submit">
</FORM>

gives us

your response:

The contents are interpreted as text only; HTML markup is ignored. Theoretically the user can type unlimited amounts of text into the textarea field. In reality the browser sets the limit, usually no more than 32 K. If you want users to send in their latest novel, consider using file upload.

 
 
  Copyright 1997-2002 Idocs inc. Published under the terms of the Open Content License Design by Interspire