I have a textbox with an ‘Add to clipboard’ button next to it. Whenever the copy to clipboard button is pressed, I want the contents of the clipboard to get copied to the clipboard, and work in a cross browser way across Internet Explorer, Firefox, Chrome, Opera, etc. I can use jQuery or plain JavaScript.
How can this be done?
Sounds like the jQuery clipboard plugin might do the job well. You can use the selector notation with it too, ot the utility
$.copyEDIT:
ZeroClipboard is another choice and this does appear to work well (tested in Firefox 3.5, IE 6 and Chrome)