tried: http://ericphan.info/development/cross-browser-copy-and-paste-with-jquery-copy/
UPDATE: the link is not available, so I copy the contents from the cache:
Scenario
I was working on a client project for SSW when a client reported an error in a web application.
The error is related to the dynamically created mailto link, which was updated when several employees were selected. The client reported an error when they selected more than 10 employees to send by email. His Lotus Notes mail client encountered an error:
Error processing command line arguments
Checking this, I found that Outlook 2007 can easily support emails from 30-40 employees before the mailto link stops working. Cause
It turns out that the mailto specification has a limit, and mail clients also have a limit. Lotus Notes processes only 240 characters in mailto link and other modern email clients such as Outlook 2007, supports 2083 characters - maximum URL length
This explains the inconsistency in testing. Fix - jQuery for salvation
Since this is a limitation of the HTML specification, we need another solution to meet customer requirements: “I want to be able to select multiple employees and send them to all users”
We could create an email form that used SMTP to send email, but the client wanted to use Lotus Notes as their email client.
In the end, we changed the "Email" button to copy all emails (separated by commas) to the clipboard and opened a new email window. The whole client had to press CTRL + V and paste the emails in the TO field. It was the fastest and most economical solution, which gave the client the flexibility to use his own mail client.
There is a jQuery plugin called jquery.copy that provides cross-browser copy and paste using the flash (swf) file. This is similar to how the syntax shortcut works on my blog.
After linking to the jquery.copy.js file, all you need to do to paste the data into the clipboard is as follows:
$.copy("some text to copy");
Nice and easy;)
Note: you may need to change the path to the SWF file in jquery.copy.js to make this work