How do i trigger a hidden button

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?

 

Hello,

Try to use:

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

instead.

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


Hi Jorge,

You can try this function:

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