NameSilo

Text Area Help

SpaceshipSpaceship
SpaceshipSpaceship
NamecheapNamecheap
Watch

dc1pop

VIP Member
Impact
13
I have a text area section on my website i would like to create a button called "select all" this will then select the code within the given textarea.

Ive tried to do a few searchs on google but cant find the code Ive seen it done on some sites so it must be doable :)

Thanks for any help!

Regards,
Darren
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Give the textarea an id (<textarea id="text"></textarea>)

And do
<input type="button" onclick="document.getElementById('text').select();" value="select text" />
 
1
Close
Brillant! Great Help! Thanks :)
 
0
Close
You don't even need to use a button ;)

HTML:
<textarea name="bleh" rows="5" cols="40" onClick="this.select();">bleh</textarea>
 
1
Close
hmm well didnt know that :D

Thanks for the help aswell :D
 
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Filters for activity feeds
Your news feed, Latest activity, and the activity tab on profiles now have filter buttons: All, Posts, Quick replies, and Other. Your...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back