[Mobile] Show alert popup message to navigate other screen

Hi everyone,


I would like to achieve the follow development:

  • When you are in screen (with Web Block) and you navigate to other screen (click in bottom bar or in side menu) show alert message (in this case is a pop up) that you are navigate to other screen (if set yes, goes to that screen selected, if not, stay in same screen).


I tried before the command "OnBeforeUnload", but I don't know if results well in Mobile platform:

https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onbeforeunload


Could you help to achieve this?


Many thanks in advance

JP

Hello JP,

You can try the Confirmation Message property associated to the link or button that navigates to the other screen.


Basically, after defining the confirmation message, it will show a native pop-up with that message. The pop-up is managed by the operating system of the device.

Here's an example of how it will work:



Let me know if this worked for you.


Kind regards,
Rui Barradas

Hi, 


Thanks in advance, but this solution doesn't work what I pretend to develop. I just want the alert message in one specific screen:

If you are in screen 1 (in this case you have a form), and you click on link in side menu or bottom menu, appears an alert message that you are leaving.


Many Thanks

JP

Hi JP,


Okay, now I understand what you want. It is a little bit more tricky then... I was thinking about it.


What you can do is to place this logic inside the Side / Bottom Menu. Instead of having direct links to pages, you can have links to screen actions defined inside the Side / Bottom Menu. Each of these actions will have an Input boolean parameter (for example, NeedsConfirmation). If it is false, you navigate directly to the respective screen. Otherwise, you can launch an event to be handled in the parent (page).


Then you just need to define a screen action in the parent and define the logic to show a modal / pop-up with the confirmation message.


I think that this solution might work :)

Let me know if you managed to do it.


Kind regards,

Rui Barradas

jponte wrote:

Hi, 


Thanks in advance, but this solution doesn't work what I pretend to develop. I just want the alert message in one specific screen:

If you are in screen 1 (in this case you have a form), and you click on link in side menu or bottom menu, appears an alert message that you are leaving.


Many Thanks

JP

Hi,

You can use below code to display message.We are also having the similar requirement in mobile app not exactly but in that case we achieved using below snippet.