Logic Machine Forum
Links as Event Action - 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: Links as Event Action (/showthread.php?tid=5444)



Links as Event Action - Leo681 - 30.05.2024

Is it possible to set an "link" as an Event Action?

We have two options for the user,

   

The first one is an event action if the X is clicked on, the second one is a standard link. Is it possible to modify the event action section to appear as a standard link? So when the the user clicks on it, instead of a link being called, and event script is executed?

Thanks


RE: Links as Event Action - admin - 30.05.2024

Set link Additional classes to custom-link and add code to Custom JavaScript. Modify group address / value as needed.
Code:
$(function() {
  $('.custom-link')
    .off('vclick')
    .on('vclick', function() {
        grp.write('0/0/1', false);
    })
});



RE: Links as Event Action - Leo681 - 31.05.2024

Works great!!

Thanks