SitePoint Sponsor |
|
User Tag List
Results 1 to 8 of 8
Thread: JS for copy text from textarea
-
Dec 1, 2008, 15:04 #1
- Join Date
- Nov 2008
- Location
- Slovenia, EU
- Posts
- 60
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
JS for copy text from textarea
Hello,
I would need js script that copy the content of specific textarea just with a clikc on link (or button). The problem is that generic copy function works only in IE. I googled a bit but found nothing. Can you advise me where to search?
I don't know much about js ...
Thank you!
-
Dec 1, 2008, 15:06 #2
- Join Date
- Aug 2007
- Location
- Brighton, UK
- Posts
- 2,006
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Do you want to copy it to the user's clipboard or somewhere else on the page?
★ James Padolsey
–––––––––––––––––––––––––––––––––––––––
Awesome JavaScript Zoomer (demo here)
'Ajaxy' - Ajax integration solution (demo here)
-
Dec 1, 2008, 15:18 #3
- Join Date
- Nov 2008
- Location
- Slovenia, EU
- Posts
- 60
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Of course, I forgot: to the clipboard.
-
Dec 1, 2008, 15:21 #4
- Join Date
- Sep 2005
- Location
- Sydney, NSW, Australia
- Posts
- 16,875
- Mentioned
- 25 Post(s)
- Tagged
- 1 Thread(s)
Only IE has direct access to the clipboard. To be able to copy to the clipboard from other browsers (assuming they are running on an operating system that has a clipboard) you would need to use an alternative language to perform the copy such as Flash.
Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
-
Dec 1, 2008, 15:32 #5
-
Dec 2, 2008, 09:56 #6
- Join Date
- Nov 2008
- Location
- Slovenia, EU
- Posts
- 60
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yes, I have this option on my website (in signature - ipsum-generator) but is seems that this flash file doesn't work anymore in the latest version of flash plug-in. It stopped working when I upgraded flash version 2 days ago.
My flash ver. is now: 10.0 r12.
Any other suggestions?
-
Dec 3, 2008, 08:55 #7
- Join Date
- Nov 2008
- Location
- Slovenia, EU
- Posts
- 60
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Really no any other suggestion?
-
Dec 3, 2008, 12:44 #8
- Join Date
- Sep 2005
- Location
- Sydney, NSW, Australia
- Posts
- 16,875
- Mentioned
- 25 Post(s)
- Tagged
- 1 Thread(s)
Since that's the only way to do it from within the web page the only alternate suggestion would be to let your visitors do the copy for themselves.
Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
Bookmarks