Integrate a event listner in mendix in entire application just like custom css

0
Hi, I need a requirement to execute a javascript code when button with a certain class is clicked. But the button will be in multiple pages and have some actions. So i want a way to write a event listner just like how we apply css in sytling, which will apply to all the parts of application whenever a element uses that class. Is there any way to do that?    Any documentation for reference will be helpful. Thanks in advance
asked
1 answers
0

Hi,

 

You can execute custom Javascript in either a Javascript snippet (see this component) or in a Nanoflow using a custom Javascript action. This nanoflow could for example be triggered using the Events widget upon loading of the page.

 

Either widget can be integrated inside your main layout(s), so that they are present on every page in your application. Hope that helps!

answered