PDA

View Full Version : Can I copy a field's info to the clipboard?


Bullschmidt
08-28-2003, 01:22 PM
Let's assume I have a form called frmMain and an input field called MyField. How can I create a JavaScript function to copy that field's information to the Windows clipboard?

I know I could just write directions for the user to right-click on the field and then do Select All and then do right-click again and then Copy, but I'd like to have a JavaScript function do this instead.

The function would be triggered by the onclick of a button. (And the purpose would be to make it easy for the user to copy and paste this info into an e-mail.)

A1ien51
08-28-2003, 01:28 PM
You can do it IE-only....

http://www.dynamicdrive.com/dynamicindex11/copytext.htm