We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,106 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Good javascript to select all

Hi Guys

I have a text area(in php) that contain some text.I want a javascript that select the text and copy to clipboard automatically.Then it display "Link copied to clipboard alongside the text area

Can anyone of you suggest me a good javascript ?

4
Contributors
4
Replies
2 Days
Discussion Span
9 Months Ago
Last Updated
5
Views
Khav
Junior Poster
103 posts since Jun 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0
iamthwee
Posting Genius
6,254 posts since Aug 2005
Reputation Points: 1,567
Solved Threads: 476
Skill Endorsements: 34

Any solution that don't use jquery......

Khav
Junior Poster
103 posts since Jun 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

No no, you don't need JQuery but you may want an external library. I used to used ZeroClipboard library and it worked for a while. Unfortunately, it no longer works for me due to certain changed in browsers' securities. Don't know whether they have updated it already. Nowadays, I have to leave the "copy" part out and just simply highlight the area that user wants to copy.

Taywin
Posting Maven
2,633 posts since Apr 2010
Reputation Points: 275
Solved Threads: 375
Skill Endorsements: 17

Any solution that don't use jquery......

only IE provides native support - other than that, there isn't any.

Troy III
Master Poster
741 posts since Jun 2008
Reputation Points: 140
Solved Threads: 95
Skill Endorsements: 5

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0731 seconds using 2.74MB