Event Based Rule to Fire on Multiple Element Tag or Selectors | Community
Skip to main content
Thomas_S_DLX
Level 2
November 13, 2017
Solved

Event Based Rule to Fire on Multiple Element Tag or Selectors

  • November 13, 2017
  • 2 replies
  • 2009 views

I am trying to have a single event base rule fire on two different button clicks. I can only get one to work at a time so I had to create two different rules.

I tried using the classes, data-ceid, etc. If I do one at a time they both work, hence I implemented two event rules, but how could I have done this with one rule?

<button style="padding-top: 7px; padding-bottom: 7px; padding-right: 35px; margin-bottom: 7px;" class="red-button-lg eh-cta" title="Top Submit" data-ceid="Top Submit Button"><img style="padding-left: 0;" src="/sites/www.xyz.com/files/arrow.png" alt=""><span style="display:inline-block; padding-top:10px; padding-left: 20px;">Sign up today</span></button>

<button class="buttonicon talk eh-cta" title="Bottom Let's Talk" data-ceid="Bottom Let's Talk" type="button">

          <img alt="" src="/sites/www.xyz.com/files/arrow.png" style="padding-left: 0; width: 42px; height: 42px;">

          <span style="display:inline-block; padding-top:7px">Sign up today</span></button>

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by jdonley

In the Element Tag or Selector field, you can separate multiple selectors with a comma. For example, based on what you highlighted red in your post, you can use this:

button.red-button-lg.eh-cta[data-ceid="Top Submit Button"],button.buttonicon.talk.eh-cta[data-ceid="Bottom Let\'s Talk"]

2 replies

PratheepArunRaj
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
November 14, 2017

Hello Thomas,

1. Under Event Based Rules, try to assign Propetries and Values in manual : Below the screen grab.

2. If the above solution didnt work, Create a Page Load Rule. Under Javascript/Third Party Tags, customize you JavaScript coding to fire the specific events for both the buttons on on-click action. This should definitly work!

Thank You!

Arun

Thank You, Pratheep Arun Raj B (Arun) | Xerago | Terryn Winter Analytics
jdonleyAccepted solution
Level 8
November 16, 2017

In the Element Tag or Selector field, you can separate multiple selectors with a comma. For example, based on what you highlighted red in your post, you can use this:

button.red-button-lg.eh-cta[data-ceid="Top Submit Button"],button.buttonicon.talk.eh-cta[data-ceid="Bottom Let\'s Talk"]