Logic Machine Forum
Open another device visualization with a button - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: Open another device visualization with a button (/showthread.php?tid=1903)



Open another device visualization with a button - CHOUAIBOU - 11.02.2019

Hi 
Is there any way to use a button to open another device webpage (via its URL) with a button created in LM/SL visualization page without using frame ?
Problem : I have an URL of a webpage of a remote device, as a customer, I would like to use LM/SL visualization page with an icon  to open that webpage on a different and new windows of my browsers.
I made the tests fews years ago with a custom javsScript associated to a button (not SVG), it didn't worked as I was only able to open the remote web page on visualization page without any size control.

B.R,
Chouaibou.


RE: Open another device visualization with a button - admin - 11.02.2019

You can call window.open from Custom JavaScript to open any URL in new tab/window. Set additional classes to link for your element.
Code:
$(function() {
  $('.link').off('vclick').on('vclick', function() {
    window.open('http://openrb.com');
  });
});



RE: Open another device visualization with a button - CHOUAIBOU - 11.02.2019

(11.02.2019, 09:07)admin Wrote: You can call window.open from Custom JavaScript to open any URL in new tab/window. Set additional classes to link for your element.
Code:
$(function() {
 $('.link').off('vclick').on('vclick', function() {
   window.open('http://openrb.com');
 });
});

Thank you admin,

B.R,
Chouaibou.