Click to See Complete Forum and Search --> : Can Java copy text to clipboard?


shawjames
05-11-2003, 07:52 PM
I want to make a button that if clicked will copy a text string to the local clipboard. Basically doing the same thing as highlighting some text and pressing Ctrl-C

Can Javascript do this?

shawjames
05-11-2003, 09:25 PM
Cool, I got the copy to work... but I can only get it to copy to the clipboard text that is highlighted.

Can the copy command save a predefined text string to the clipboard?

I tried this:
document.execCommand("copy", "false", "test");

I wanted to try and save "text" to the clipboard everytime the function is called... but this didnt work.

Is there a different way to do this?

BrainDonor
06-19-2003, 11:23 AM
Is there a way to get the highlighted text to copy to the clipboard without the hyperlinks remaining active?

I have the copy and paste part working fine...

I have a "locked down" report that hides url, suppresses right clicks, etc. I want the user to be able to copy the page to the clipboard and paste the info into Excel without any of the hyperlinks remaining active. Is this possible?

Thanks!
Tom