Covering OroCRM topics, including community updates and company announcements.  Subscribe

Forums OroPlatform OroPlatform – HTML, JavaScript, CSS, Design Questions Simple JS functions/handlers and Oro's frontend

This topic contains 5 replies, has 2 voices, and was last updated by Stepan Yudin Stepan Yudin 1 year, 1 month ago.

  • Creator
  • #61050
    Stepan Yudin
    Stepan Yudin

    Good day everyone

    I totally cannot figure out how to solve my problem.
    To put it briefly: my JS function fires multiple times.

    I put JS handlers directly into my templates
    Lets consider the following simple example.

    So, each time i open this page – js handlers applies again and when i click a button i recieve several messages in console.
    I understand why this happens – frontend doesnt know when to dispose my JS functions and they stay alive.

    What is the simplest way to solve this? Im totally dumb in modern JS frontend. I saw manual how to define components, but i dont need to define template of component. Only js handlers to intercept click on some elements with some classes.
    In fact all i need is to create some click handlers (for special CSS classes) and correctly apply them only at specified pages (not across the whole application)

    Docker environment for Symfony2/OroCRM/OroBAP development on Windows platform

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.