Home / Free JavaScripts / Forms / Here

Website Abstraction

Cut & Paste "Select-all" form element script

Credit: Website Abstraction

Description: This script allows you to add a "select all": feature to your form <textarea>s, whereby visitors can easily highlight the containing content with a click on a link. Dynamic Drive, our partner site, uses something similar to allow its users to conveniently copy scripts on the site.

Example:

Select All

Directions: Simply insert the below in the <body> section of your page:

It contains the script itself, plus one <textarea> with the Select All feature added. To enable multiple form elements with such a functionality, simply add more of the below link code to the form

<a href="javascript:selectAll('test.select1')">Select All</a><br>

where "test" denotes the name of the form, and "select1", the name of the <textarea> to highlight.

Enjoy!



spacer.gif (810 bytes)

.
CopyRight © 1997-2001 Website Abstraction. All rights reserved


spacer.gif (810 bytes)