Javascript Select All Text Form Button Textarea With Java Script Focus()
Description: Javascript Select All Text Form Button Textarea With Java Script Focus()
Tags: javascript ,select ,all ,text ,form ,button ,textarea ,with ,java ,script ,focus
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
<html>
<title>Cool Javascript Tricks Select All Code From Textarea Form</title>
<body bgcolor="#FFFFFF">
<center>
<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.
</textarea>
<br>
<input type="button" value="Highlight Text" onClick="javascript:this.form.text_area.focus();this.form.text_area.select();">
</form>
</center>
</body>
</html>
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
bobby Wed Jul 13, 2011 Thank you
ram Tue Oct 19, 2010 if i enter a text in text box that text text to be copied to another text box while i typing in the first text box
nixau Sat Oct 16, 2010 please help... how can i make it auto highlight and auto copy the text in the text area after clicking the Click Here To Highlight Text button.
thanks
indar Mon Sep 27, 2010 heye , Thanks for the nice code................
rakei Fri May 28, 2010 How is it that the textarea's background is brownish?
Surya Wed Nov 11, 2009 hi,
i have a problem,i opened another site in my project using i frame, so whatever user selectes in the other site has to be copied using js how should i do this,any idea.
SauloA Mon Jun 29, 2009 this code was exactly what i was looking for. it was very easy to use. works great on my website, otakuwanted
hafiya Thu Apr 02, 2009 document.getelementbyid('').selec does not work in mozilla firefox
Luis Thu Feb 05, 2009 i liked a lot. thank you. i tried to combine the two scripts, the first to highlight the area and the second button to copy. still work to do. thank you!
prudhviraj Fri Nov 21, 2008 hi your materials are very much help ful i am working out the same in my proj
but it was not working with fire fox
please let me know asap
thanks
Manpreet Mon Nov 17, 2008 i found this an intereing thing but one thing i would like to know how can we use the same thing for .net:= on same button click and/or say page load
diane Tue Oct 28, 2008 thank you for this one! this is what i exactly needed. i had a hard time searching for this!
ken Mon May 19, 2008 thank you! its very useful
test Thu Apr 05, 2007 testing asfsadfs sdfsa sdfas sdf awfwerawe
Information
Title: Javascript Select All Text Form Button Textarea With Java Script Focus()
Info: This Post Has Been Viewed 0 Times Since
Date: Fri Dec 22, 2006
Author
webmaster Received 14 Replies #785
Related Content
Related Pages
Related Sites
Add Your Website
Share
URL:

Share this page by putting this URL in your comments to other websites like myspace, Facebook, Twitter friendster, Hi5, Groups, Boards, Forum or others. Just Copy and Paste this Code
Embed:

To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it
BBCODE::

BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums