Atozed Forums

Full Version: Copy to clipboard?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
IWLabel dont generate HTML focus controls and likely are not selectable either from the JS perspective.
IWLabel to copy is out of question.

IWMemo works.... ONLY if its visible = true.

If I set to visible = false, then copy doesn't generate anything. No javascript error, but not is put into the clipboard.
Make it visible, then it works Sad
If it isnt visible, it wont be rendered in most cases and JS cant select it. You can try rendering it while invisible.
(04-30-2018, 02:20 AM)cpstevenc Wrote: [ -> ]IWLabel to copy is out of question.

IWMemo works.... ONLY if its visible = true.

If I set to visible = false, then copy doesn't generate anything. No javascript error, but not is put into the clipboard.
Make it visible, then it works Sad

I'm copying info from hidden fields using the DOM object on a 3rd party site, as a cobbled interface.   I haven't tried it in js but I don't see why copying that data into a js variable and placing it in the clipboard wouldn't work.

It's been a couple of years since I wrote that code, and it uses TWebBrowser (so IE specific) but I'd be surprised if you can't do the same thing in JS.  Some elements allow el.Value, others I use el.innerText or for checkboxes el.checked etc.

Note:  as I said, I programmed against the document object in TWebBrowser.  I do NOT claim to know JS (it makes me dizzy <g>).   Set the value into the variable, rather than trying to use Copy.

Dan
Pages: 1 2