201
Views
4
Comments
Solved
multiple events on single Button
Application Type
Reactive

Hi,

I have use case where I have one button. onclick of that button I should redirect to screen A & on double click of same button I should redirect to screen B.

How can we achieve this functionality?

I tried using Events in button properties, but it is not working.


Regards,

Dipali S

2026-01-03 13-44-38
Erwin van Rijsewijk
Champion
Solution

This is not working once. I made a new example and I can constantly click or double click. Just don't doucleclick to fast..
From an UX view, I wouldn't make a button that can be clicked or double clicked, but I would make 2 buttons or links ;-)

Button2.oml
2026-01-03 13-44-38
Erwin van Rijsewijk
Champion

Hi Dipali,

If you make an expression and give it class "btn btn-primary" it will look as a real button. Then you make the onclick and ondoubleclick events, it should work. Take a not of the order: first the doucle click event, second the onclick, this is important!

I also attached an oml to show it working

I also 

Button.oml
2024-01-09 08-05-30
Dipali Shrawane

Hi @Erwin  van Rijsewijk,

Thanks for quick response.

It is working only once but again if we click or double click, same functionality should work.

Is there any way to achieve this(using JS or something).


2026-01-03 13-44-38
Erwin van Rijsewijk
Champion
Solution

This is not working once. I made a new example and I can constantly click or double click. Just don't doucleclick to fast..
From an UX view, I wouldn't make a button that can be clicked or double clicked, but I would make 2 buttons or links ;-)

Button2.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.