Expand my Community achievements bar.

Join us for the Adobe Journey Optimizer Community Q&A Coffee Break on 28th February at 8 am PT with Ariel Sultan, Daniel Wright, Josee Haeley and Rohit Basuri.
SOLVED

Keypress event rule not working

Avatar

Level 4

Hi,

I want to fire an event based rule if anyone clicks on the Enter key(keyboard) to get the search results. Anyone successfully created event based rule with keypress "event type". I tried muliple options but rule is not working. Can someone help me on this. Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Level 4

This snippet just worked for me

if (event.keyCode == 13){ return true; }

Since your event is on #search I don't think you need to reference #search again in the Custom Condition for something like this

View solution in original post

2 Replies

Avatar

Correct answer by
Level 4

This snippet just worked for me

if (event.keyCode == 13){ return true; }

Since your event is on #search I don't think you need to reference #search again in the Custom Condition for something like this

Avatar

Level 9

spectaprod wrote...

This snippet just worked for me

  1. if (event.keyCode == 13){
  2. return true;
  3. }

Since your event is on #search I don't think you need to reference #search again in the Custom Condition for something like this

 

 

Thanks for the quick reply!

-Tacia