File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Copy content to clipboard Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Copy content to clipboard" Watch "Copy content to clipboard" New topic
Author

Copy content to clipboard

vineet kumar chaudhry
Ranch Hand

Joined: Apr 02, 2011
Posts: 45
Hi ALL

Do we have javascript that copies the contents to clipboard and which is atleast compatible with common browser like IE,Firefox,Chrome,Safari


Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Modern day browsers have security settings preventing it from happening. That is why the copy function here on the code blocks does not work. Only way for a pure JavaScript solution is to work is the user changes security settings. Other way around it is using a little flash file that does it. Google for it.

Eric
vineet kumar chaudhry
Ranch Hand

Joined: Apr 02, 2011
Posts: 45
Are you refering to ZeroClipboard Library in flash10 ?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Copy content to clipboard