Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
 Discussion Forums
 HTML, XML, JavaScript...
 Software Reviews
 Editors,Others...
 Top100
 JavaScript Tutorials, ...
 Tutorials
 ASP, CSS, Databases...
 Discussion List
 FAQ, Roundup, Configure ...
 Authoring
 HTML, JavaScript, CSS...
 Design
 Layout, Navigation,...
 Graphics
 Tools, Colors, Images...
 Software
 Browsers, Editors, XML...
 Internet
 Domains, E-Commerce, ...
 WDVL Resources
  Intermdiate, Tutorials,...
 WDVL
 Discussion Lists, Top 100,...
 Technology Jobs


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Top 10 Articles
  1. Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
  2. JavaScript Tutorial for Programmers
  3. Design
  4. JavaScript Tutorial for Programmers - Objects
  5. JavaScript Tutorial for Programmers - JavaScript Grammar
  6. JavaScript Tutorial for Programmers - Versions of JavaScript
  7. Cascading Style Sheets
  8. JavaScript Tutorial for Programmers - Embedding JavaScript
  9. JavaScript Tutorial for Programmers - Functions
  10. Authoring JavaScript
Domain Name Lookup
Search to find the availability of a domain name. Just enter the complete domain name with extension (.com, .net, .edu)

The Text Area Widget

The Text Area Widget

  • There are many circumstances in which you want to allow the user to enter more than simply one line of text. In such a situation, the widget you want to use is the Text Area. Below is an example Text Area widget.

  • The previous Text Area widget was created with the following code:

        <FORM>
        <TEXTAREA 	NAME	= "demo"
    		ROWS	= "6"
    		COLS 	= "30"
    		>
    	
        </TEXTAREA>
        </FORM>
    

  • Notice how you can type in multiple lines to the text area widget and scroll up and down using the scroll bar on the right and left and right with the scrollbar on the bottom.

  • Notice also, that as usual, the input widget includes a NAME attribute that will be used for creating the HTTP body. In the case of the text area widget, the text that the user types into the widget will be set as the VALUE for this NAME. http://Stars.com/Development/Webprog/textarea_widget.html

  • The Text Area widget also has several other attributes that affect how it works. The following table outlines them:

    Attribute Description
    NAME Specifies the variable name associated with this widget
    ROWS Specifies the height of the text area widget
    COLS Specifies the width of the text area widget
    WRAP Specifies the logic of word wrapping. It can be NONE, SOFT or HARD as explained below

The ROWS and COLS Attributes

  • Of course, the above text area is not very easy to use since it is so small. The Text Area widget also has two attributes that affect the size of the widget. These are the ROWS and COLS attributes and are best shown by example. Consider the following text area widget.

  • The previous Text Area widget was created with the following code:

        <FORM>
        <TEXTAREA 	NAME = "demo"
    		ROWS = "6"
    		COLS = "30"
    		>
        </TEXTAREA>
        </FORM>
    

The WRAP Attribute

  • The Text Area widget also allows you to specify how word wrapping will function. You can specify NONE, SOFT, or HARD word wrapping. SOFT word wrapping means that the widget will wrap text in the browser windows but will not report the wrapping information to the server. HARD word wrapping, on the other hand, will be reported as multiple lines. NONE means that the text area widget will not wrap text at all.

  • You have already seen text areas without word wrapping above since the text area defaults to NONE. But you have not seen a text area with word wrapping. We will show you one of those below (notice that if you type a line that is too long to fit in the text area, it will wrap to the next line automatically:

  • The previous Text Area widget was created with the following code:

        <FORM>
        <TEXTAREA 	NAME = "demo"
    		ROWS = "6"
    		COLS = "30" 
                    WRAP = "HARD"
    		>
        </TEXTAREA>
        </FORM>
    

Default Text

  • Finally, you should know that you can add default text to the text area simply by placing it between the opening and closing TEXTAREA tags as follows:

  • The previous Text Area widget was created with the following code:

        <FORM>
        <TEXTAREA 	NAME = "demo"
    		ROWS = "6"
    		COLS = "30" 
                    WRAP = "HARD"
    		>
        Here is some defalt text
        </TEXTAREA>
        </FORM>
    

The Select Widget
Table of Contents
The Button Widgets


Up to => Home / Authoring / Scripting / Tutorial




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers