have you ever seen those cool tricks on other websites where they have the code and to copy the code they have a submit form so you can hightlight all the text in the text area, well this script below will show you how you can do this. you can learn from this simple code by copy and paste into a text editor link notepad and save it, then upload to your website to see it in action.

here is a demo:

and here is the code: Courtesy of www.webune.com
<title>Cool Javascript Tricks Select All Code From Textarea Form</title>
<body bgcolor="#FFFFFF">

<form name="select_all">

<textarea name="text_area" rows="10" cols="80">
Wallpaperama is an amazing collection of High quality, high resolution wallpapers for your computer desktop for free. Download your favorite high resolution wallpaper for free at wallpaperama.com. Our free wallpapers include a large collection of wallpapers for your computer desktop. You will find only free wallpapers, no pop-up ads, no spam, no spyware only high quality free wallpapers for your computer background. Surf with confidence.

<input type="button" value="Highlight Text" onClick="javascript:this.form.text_area.focus();this.form.text_area.select();">



please tell me if this was helpful. if it was not please tell me what you were looking for. i would appreciate your comments. i want to help anyone. i have extensive knowledge in javascript and i might be able to help you in what you are looking for. my scripts/snippets are free. please feel free to ask any questions you may have