Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Copy content to clipboard

 
vineet kumar chaudhry
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you refering to ZeroClipboard Library in flash10 ?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic