Expand my Community achievements bar.

SOLVED

DTM Event based rule doesn't work in Firefox

Avatar

Level 3

The code for which i need to write event based rule is as follows.

<div class="search-result-message-subject"> <h2 class="lia-message-subject"> <div style="display: none;" class="lia-search-source">1</div><a class="lia-link-navigation lia-message-read" id="topicMessageLink" href="https://forums.adobe.com/t5/Tech-OnTap-Editions/August-Tech-OnTap-Newsletter-here-s-what-you-ll-find-insde/ta-p/397" data-ntap-position="1" data-ntap-keyword="ontap">August Tech <span class="lia-search-match-lithium">OnTap</span> Newsletter - here's what you'll find insde</a></h2> <span class="lia-message-author"> by <span class="UserName lia-user-name lia-user-rank-Community-Manager"> <a class="lia-link-navigation lia-page-link lia-user-name-link" style="" target="_self" id="link_33" href="https://forums.adobe.com/t5/user/viewprofilepage/user-id/25"><span class="login-bold">JonW</span></a> </span> in <a class="lia-link-navigation search-board-link" id="link_34" href="https://forums.adobe.com/t5/Tech-OnTap-Editions/tkb-p/tech-ontap-editions">Tech OnTap Editions</a> </span> </div>

This section of code repeats with the anchor tag ID changes to id="topicMessageLink_01".

So my event rule is set as selector= div.search-result-message-subject a and I have manually assigned the property "ID" as topicMessageLink. (as regular expression) This works fine in chrome but it doesn't work in firefox. Please help.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Vidya ,

Can you please share your DTM account credentials via private message on the DTM forum as well as the link to the Webpage so that we are able to reproduce the issue at our end.

Thanks & Regards

Parit Mittal

View solution in original post

6 Replies

Avatar

Level 3

 If i remove the property it works in both the browsers but all the anchor tag starts firing where i would like to restrict the anchor tag to one which has id that starts with topicMessageLink.

Avatar

Level 10

Hi Vidya,

Thanks for reaching out to the DTM community. Can you please share the "Regular expression"  you are using  so that we can further deep dive into the issue.

Thanks & Regards

Parit Mittal

Avatar

Level 3

I have set ID as topicMessageLink.

Avatar

Level 10

Hi Vidya,

Can you please let us know the version of Mozilla Firefox you are using. Also, can you please  open the page that contains the code which you mentioned above and then open the console of the Firefox browser and copy & paste below code: 

    var str = document.getElementsByClassName("lia-link-navigation lia-message-read")[0].getAttribute("id");
    var patt = new RegExp("topicMessageLink");
    var res = patt.test(str);
  alert(res);

if the value returned  is "false" this would mean that the regular expression is not working properly in current version of Firefox browser otherwise if value returned is "true" then we have to further work to find out the root cause of the issue.

Thanks & Regards

Parit Mittal

Avatar

Level 3

Hi,

I have pasted the same code that you have mentioned, in the console and got the answer as true. The ff version that I am using is 44.0.2.

Regards,

Vidya

Avatar

Correct answer by
Level 10

Hi Vidya ,

Can you please share your DTM account credentials via private message on the DTM forum as well as the link to the Webpage so that we are able to reproduce the issue at our end.

Thanks & Regards

Parit Mittal