Home › Forums › JavaScript › Looking for Current Cross Browser Solution – Copy and Paste I’ve found code on s/o, code project, and quite a few other websites but can’t seem to get any to work properly. Can anyone point me to a current solution? Thank so much. With this information we can’t help. I’m not seeing any code or whatever in your post. I used this plug in: http://ericphan.info/blog/2010/1/25/cross-browser-copy-and-paste-with-zeroclipboard-updated.html This uses flash.. which won’t work on an iphone… and we kind of need that to work. I’ve done some other searches and can only seem to find stuff that is working with flash. I tried to locate the copy() plug in for jquery but on the jquery site all the plugins are missing – and can’t find an update to them anywhere. I wish I had some code to show… at the moment working with flash isn’t an option. Edit: Some that i tried yesterday:
also – not sure how to get this to work.. but I wouldn’t mind this one: Flash doesn’t work on iOS full stop. Can you explain what you’re looking to achieve? Is it just a “one click” button to copy a whole element of text to the clipboard or something? There may be far easier ways to solve your problem depending on the required functionality. Looking for Current Cross Browser Solution – Copy and Paste with Javascript / Jquery – Copy Div to Clipboard Not sure what happened to the entire title… Copying an element by id. Thanks.
stillb4llin
Vermaas
Andy Howells
stillb4llin
http://www.htmlgoodies.com/beyond/javascript/article.php/3458851/Click-Its-Copied.htm
function copyToClipboard (text) {
window.prompt ("Copy to clipboard: Ctrl+C, Enter", text);
}
Andy Howells
stillb4llin
Forums
The forums ran from 2008-2020 and are now closed and viewable here as an archive.