30.10.2024, 15:33
Hi,
is there a way to update the external link URL via script?
Thanks
PEPPE
is there a way to update the external link URL via script?
Thanks
PEPPE
link on scada-vis
|
30.10.2024, 15:33
Hi,
is there a way to update the external link URL via script? Thanks PEPPE
30.10.2024, 15:41
31.10.2024, 12:33
(30.10.2024, 15:41)admin Wrote: See this: https://forum.logicmachine.net/showthrea...6#pid11806 $(function() { $('.link').off('vclick').on('vclick', function() { window.open('http://openrb.com'); }); }); That's fine, but I need to pass the URL from a key in storage... is it possible?
01.11.2024, 07:35
Use a virtual object with 250 byte string data type (32/0/1 in this example).
Code: $(function() {
01.11.2024, 12:58
(01.11.2024, 07:35)admin Wrote: Use a virtual object with 250 byte string data type (32/0/1 in this example). in fact I had already thought of this solution, the problem is that the URL is too long and is truncated to 250 bytes as it contains an authentication token that changes every time: http://10.0.0.146:8080/dashboard/28a2e20...8So-6_WXUw
01.11.2024, 13:03
You can create a .lp file that redirects to the specified URL from a storage entry. This way you don't need Custom JS at all. Link URL should be set to /user/redirect.lp.
Code: <?
01.11.2024, 13:21
(01.11.2024, 13:03)admin Wrote: You can create a .lp file that redirects to the specified URL from a storage entry. This way you don't need Custom JS at all. Link URL should be set to /user/redirect.lp. sorry, but I have no idea about that... as you can understand, I just need to set a button object or something to click on visu to open a new tab in the browser with the link. Can you please give me the operating steps to do it? where I have to put that code and how? Thanks
01.11.2024, 13:25
Create redirect.lp file and upload it to user directory via FTP using apps login.
You might still need custom JS to open URL in a new window/tab.
01.11.2024, 20:12
(01.11.2024, 13:25)admin Wrote: Create redirect.lp file and upload it to user directory via FTP using apps login. in the end I found an italian way to do it event script for the button on visu Code: url = storage.get('dashboard_url', 'https://www.google.com/') and JS Code: // Funzione per aggiornare l'URL una volta ricevuti tutti i blocchi Best regards Peppe |
« Next Oldest | Next Newest »
|