Forums

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

This topic contains 2 replies, has 2 voices, and was last updated by thinh2010 thinh2010 4 months ago.

  • Creator
    Topic
  • #35524
    thinh2010
    thinh2010
    Participant

    Hi everybody,

    I got a problem about jquery.
    I create an event listener each time my checkbox is changed. And the event always call twice.

    My code alert twice, ‘checked’ and ‘unchecked’.

    Do anyone got also this pb?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #35534
    msulima
    msulima
    Oro Core

    Hi, thinh2010.

    Your got the twice alert, because that element already have some listener that do something like

    To add your own event listener and disable all other listeners you can use

    But you do that at your own risk. Disabling some other listeners can bring some bugs in functional of that elements.

    #35538
    thinh2010
    thinh2010
    Participant

    Hi, thank for your reply. I already found the problem.

    Because I added attribute class to field in form

    and this class add twice in frontend. 1 in container and 1 in input. So that it called twice.

    I replaced the class by

    and it works.

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

You must be logged in to reply to this topic.

ssossossosso