Ok say you have this:
<input id="test" value="" />
Value of that input is dynamicly generated.
Now a user can double click on that input to select value, ctrl+c to copy.
I also found that with javascript you can select value of input with “click”.
But when it comes to creating a button that when clicked will copy value of that input into OS’s clipboard – i have found only solutions that works with Flash.
Now i want to know how can i create that button with javascript? Ofc if it is possible… 🙂
Considering the implications (especially security concerns), copying to/from clipboard is not something that is quite allowed / easy.
Those questions / answsers might help you, about that :
In each case, it seems that the solution is to use some little .swf file — which means working with flash (maybe some old version of flash, actually)…
For instance, you could take a look at the Zero Clipboard library (yeap, flash…) :
In pure Javascript, it seems to be possible in Internet Explorer, but not in other browsers…