A time ago i need a script to do this action, and after some searching i found how to do it. You say that you have the code that selects the content text of the textarea, so, simply add a button to your form which will perform the action of copying it to the clipboard when it is clicked and the following javascript function, you can place this function in an external javascript file or in the HEAD section of your page.
Here is the Javascript code:
CODE
function copy(text) {
if (window.clipboardData) {
window.clipboardData.setData("Text",text);
}
}
And the button:
CODE
<input type="button" value="Copy To Clipboard" onclick="copy(document.your_form_name.your_textarea_name.value);">
I'm not pretty sure but i guess that it only works with Internet Explorer 6, i don't test it with any other browser.
Check also this topic
One Click To Copy Script, Works in IE6 but not any other BrowsersBest regards,
Comment/Reply (w/o sign-up)