Hello to all,
I made this form in hopes to allow users to click a button to copy an link or an html snippet to their clipboard with out having to right click or use Ctrl+C.
I got it to work as far as to select everything, but it does not copy it to the clipboard, the user will still have to hit Ctrl+C or right click and copy. What is it that I am doing wrong?
If someone could help me out it would be greatly appreciated.
<form>
<textarea type="text" onclick="this.form.copy_code.select()" class="code_copy" readonly="readonly" name="copy_code" id="copy" style="width: 220px; height: 50px; font-size: 12px">
<a href="http://www.thecommentzone.com" target="_blank" style="font-weight:bold;">TheCommentZone.com</a>
</textarea>
<br>
<input type="button" onclick="this.form.copy_code.select();send_to_clipboard(DOMwrap('copy_code').value);" value="Copy" style="padding: 1px" class="button2"/>
</form>