The UI operation process is to put the "MES_EXP" string into the clipboard after user push down "Copy MES_EXP" button.
I had found the Java code for this app on the web, and I have tried many times to modify it according to the documentation on the NI official website.
However, it still doesn't work, I don't know where the error is, and since I don't have the ability to edit Java programs.
I will keep trying and never give up. 😊
Anyway, thank you for reading this.
Attach some information as follows:
LabVIEW Web UI:
Create JSLI in LabVIEW program:
In this case you can have the JSLI document call the navigator.clipboard.writeText function directly:
As the writeText function can be passed a string according the the MDN Clipboard.writeText documentation.
Note that the documentation states that using the writeText api requires "transient user activation". This means that you can only invoke the Write Text VI created by the JSLI in response to a user interaction. A good example is to call it in response to a button click event like the following:
Finally note that the G Web Development Software editor is based on Chrome 64 which does not support this feature. So running the Write Text VI inside the editor will result in an error. To test the behavior you need to use Run in Browser or build and deploy the WebVI to test in a modern browser.
Thank you very much, it works now.
I had been succeeded to test the behavior use Run in Browser (Edge).
And first time, I need to accept to use the clipboard in Browser.
Thank you very much.