![]() Holdtxt.innerText = document.getElementById(copytextid).innerText Īlert("text in buffer \"" holdtxt.innerText "\"") Īlert("text in buffer \"" holdtxt. ![]() Holdtxt = document.getElementById(holdtextid) To do the same thing in a standards-based browser is more complicated, and will require some other technology, like Flash.įunction ClipBoard(copytextid, holdtextid) it makes use of IE-only javascript extensions. NOTE: This only works on Internet Explorer. The click to copy method is usually used to transfer a complete code snippet or a terminal command from a specific terminal web page. Here is an example Visualforce page that incorporates javascript to copy specified text to the Windows clipboard.I'm posting it in case anyone else wants to do this again. It is crucial to know that you can create a copy to clipboard button that is going to allow users to copy the complete document with a single click. I am not a Javascript expert, which is making this all harder for me. This text will be copied onto the clipboard when you click the button below. However, I don't seem to be able to make it work in a VF page. I've got a method that works for Internet Explorer only ( ), which will be acceptable at this point, although I would prefer a cross-browser solution. Has anyone successfully created a "Copy to Clipboard" button in Visualforce?
0 Comments
Leave a Reply. |