44
Views
11
Comments
Solved
Clicking the button on the pop-up should perform the action associated with that butt
Question
Application Type
Reactive

Hi,

I created these 2 menu using pop-over menu. When click Retract, it will open the pop-up.

The problem is when I click the YES or NO button, it closes the pop-over menu instead of executing the action for the YES or NO button. Can anyone assist with this?

I've tried using this JavaScript, but it only closes the pop-over menu and doesn't trigger the action for the YES or NO button on the first click.


var x = document.getElementsByClassName("popover-bottom");

if (x.length > 0) {

    x[0].style.display = "none";

}


Thanks in advance

2020-07-21 19-28-50
Rajat Agrawal
Champion
Solution

Hi,

I have added jquery in below OML you can check add that jquery in your application.

Call in the screen level or application level.


Regards,

Rajat

PopoverMenu_Demo.oml
2024-12-18 16-06-42
Junaid Syed

Hello Daliah,

Ideally the logic that you want to execute on click of pop up buttons should be in the client actions linked to the button. Do you have those client actions defined?

Please share more details or the OML file to better understand your problem.

Hope it helps!

Junaid

2024-07-18 01-50-28
Daliah Daud

Hi @Junaid Syed ,

I apologize, but I'm unable to share the OML file since it's on my client's server.

"Ideally the logic that you want to execute on click of pop up buttons should be in the client actions linked to the button. Do you have those client actions defined?" - Yes

The issue is the client actions are triggered only after the second click; the first click closes the pop-over menu instead.


2024-12-18 16-06-42
Junaid Syed

No worries, please find attached a basic working sample. Hope it points you in right direction!

POC.oml
2024-07-18 01-50-28
Daliah Daud

Thank you @Junaid Syed, but that's not what I meant.

2024-10-19 11-15-19
Sazid

Hi @Daliah Daud 

I've created a simple app to demonstrate a popup feature. When you click 'Yes,' the popup remains open, but if you click 'No,' it will close. In this example, the popup is toggled using a local variable called ShowPopUp. I hope this helps! 

PopUp.oml
2024-07-18 01-50-28
Daliah Daud

Thank you @Sazid . That's another workaround, but my client wants the pop-up to be positioned at the end of the table column. 

2020-07-21 19-28-50
Rajat Agrawal
Champion

Hi @Daliah Daud,

Below I attached on sample OML please look into that hope this will help you.

When you click on yes button inside the popup we added one JavaScript that will and close your pop-over menu widget.



Regards,

Rajat

PopoverMenu_Demo.oml
2024-07-18 01-50-28
Daliah Daud

Thank you @Rajat Agrawal,


I tried on my personal environment but got error.


I tried implementing it in my project, but the issue is still not resolved.


Do I need to replace the word popover-background-window on this script?

$('.popover-background-window').click();

2020-07-21 19-28-50
Rajat Agrawal
Champion

For this,  you need to add jquery in your screen or in application.


Regards,

Rajat

2020-07-21 19-28-50
Rajat Agrawal
Champion
Solution

Hi,

I have added jquery in below OML you can check add that jquery in your application.

Call in the screen level or application level.


Regards,

Rajat

PopoverMenu_Demo.oml
2024-07-18 01-50-28
Daliah Daud
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.