I would like to set a few textareas up so that when a user clicks on a field it will automatically select all and issue a control-c or command-c (depending on the os) in order to copy the text to the clipboard.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Check out zClip, it is a jQuery plugin that allows you to do this:
http://www.steamdev.com/zclip/
It does use Flash to copy to the clipboard, but that’s to avoid the browser restrictions preventing this from being done only in javascript.