734
Views
3
Comments
How do i trigger a hidden button
Question

Hello everyone,

In a mobilie app, I have screen with a block, and the block has a hidden button inside. I need to trigger the button inside the block when i touch in a button outside the block.

The hidden button has the '.hidden-button' class, but it's not working.

What can i change soo it works?

 

2018-10-04 11-09-42
Tiago Oliveira

Hello,

Try to use:

document.querySelector('.hidden-button').click();

instead.

2021-04-08 11-10-22
EFreitas

Hi Jorge Mauricio,

You can call the action (from child block) directly from the parent, meaning you don't need to have an hidden button. You only expose the action to the parent.

https://success.outsystems.com/Documentation/Development_FAQs/How_to_Call_a_Block_Action_in_a_Mobile_Screen


2021-08-30 15-28-09
Leandro Correa

Hi Jorge,

You can try this function:

<script>
function myFunction() {
  document.getElementById(".hidden-button").click(); // Click on the checkbox
}
</script>

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