Monday, February 26, 2024
 Popular · Latest · Hot · Upcoming
rated 0 times [  49] [ 1]  / answers: 1 / hits: 45877  / 11 Years ago, mon, may 13, 2013, 12:00:00

I got stucked in implementing this feature on my web application. All the other possibilities are mostly by using flash content. Could someone explain how I can achieve it by using plain javascript or by Dojo.

More From » dojo


I have been working on the exact same issue for a while. For me flash isn't a viable solution so I came up with this simple work around:

<button onclick=prompt('Press Ctrl + C, then Enter to copy to clipboard','copy me')>Click to Copy</button>

It requires some extra work on the users end but at least it doesn't require flash or external libraries.

example fiddle

[#78259] Saturday, May 11, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 191
Total Questions: 93
Total Answers: 111

Location: France
Member since Thu, Oct 15, 2020
3 Years ago