Sandeep's Nook: JavaScript Page

Text Grabber

This script grabs any text that is selected by the mouse and inserts it into a textarea. The novelty of this script is that users can select various blocks of text and have them all added to the textarea conjointly.

To checkout the script just select any text in this page and click the Grab button below the textarea. The text will immediately be inserted into the textarea. Users can select as many different blocks of text in this way. Just remember to click the Grab button every time you want to include any new text in the textarea. Every new selection will appear on a new line in the textarea. Clicking the Select All button would select all the text within the textarea.

This script would be especially useful in those web pages, for instance scientific archives, where there is a lot of text, some of which the visitors might want to copy.


Author: Sandeep Gangadharan
Home Page: http://www.sivamdesign.com/home/


The script is given below:

This goes in the HEAD of the html file:


This goes in the BODY of the html file: