![]() |
|
Copy to clipboard? - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: Copy to clipboard? (/thread-114.html) Pages:
1
2
|
RE: Copy to clipboard? - kudzu - 04-25-2018 IWLabel dont generate HTML focus controls and likely are not selectable either from the JS perspective. RE: Copy to clipboard? - cpstevenc - 04-30-2018 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
RE: Copy to clipboard? - kudzu - 04-30-2018 If it isnt visible, it wont be rendered in most cases and JS cant select it. You can try rendering it while invisible. RE: Copy to clipboard? - DanBarclay - 05-01-2018 (04-30-2018, 02:20 AM)cpstevenc Wrote: IWLabel to copy is out of question. 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 |