Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Copy to clipboard?
#14
(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
Reply


Messages In This Thread
Copy to clipboard? - by cpstevenc - 04-23-2018, 03:22 AM
RE: Copy to clipboard? - by mhammady - 04-23-2018, 04:06 AM
RE: Copy to clipboard? - by cpstevenc - 04-23-2018, 02:20 PM
RE: Copy to clipboard? - by DanBarclay - 04-23-2018, 04:06 AM
RE: Copy to clipboard? - by kudzu - 04-23-2018, 04:49 PM
RE: Copy to clipboard? - by cpstevenc - 04-23-2018, 06:05 PM
RE: Copy to clipboard? - by DanBarclay - 04-23-2018, 10:41 PM
RE: Copy to clipboard? - by Jose Nilton Pace - 04-24-2018, 02:30 PM
RE: Copy to clipboard? - by cpstevenc - 04-24-2018, 08:49 PM
RE: Copy to clipboard? - by Jose Nilton Pace - 04-24-2018, 09:34 PM
RE: Copy to clipboard? - by kudzu - 04-25-2018, 03:16 PM
RE: Copy to clipboard? - by cpstevenc - 04-30-2018, 02:20 AM
RE: Copy to clipboard? - by DanBarclay - 05-01-2018, 01:40 AM
RE: Copy to clipboard? - by kudzu - 04-30-2018, 01:43 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)