How to redirect to a new page using pop-ups

I'm developing a screen in wich i have a pop-up screen that allows the user to set some parameters to access the next screen. The problem is: When i click the button to continue to the next screen instead of the redirecting to the new screen it opens the new screen inside the pop-up. How can i make it work the way i intend to ? 

Solution

Hi Lucca, 

That's how popup works, as it is a screen inside an iFrame. 

You have two options. 

1. Notify the parent using Popup_editor_Notify, and the parent navigate away. 

2. Use a Modal instead of a Popup, as it is in the page, and a redirect will work normally. 

Cheers 

Solution

Eduardo Jauch wrote:

Hi Lucca, 

That's how popup works, as it is a screen inside an iFrame. 

You have two options. 

1. Notify the parent using Popup_editor_Notify, and the parent navigate away. 

2. Use a Modal instead of a Popup, as it is in the page, and a redirect will work normally. 

Cheers 

Hi thanks! I tried your suggestion and it worked but now i can't bring the variables from the pop-up to the new page, how can i do that?


Lucca Beurmann wrote:

Eduardo Jauch wrote:

Hi Lucca, 

That's how popup works, as it is a screen inside an iFrame. 

You have two options. 

1. Notify the parent using Popup_editor_Notify, and the parent navigate away. 

2. Use a Modal instead of a Popup, as it is in the page, and a redirect will work normally. 

Cheers 

Hi thanks! I tried your suggestion and it worked but now i can't bring the variables from the pop-up to the new page, how can i do that?



You can use Popup_editor_Notify as stated above

and get the values in the OnNotify action on the screen.

Lucca Beurmann wrote:


Your screen must have input parameters? If not, make those variables as inputs to the screen as you need.

Eduardo Jauch wrote:

Hi Lucca, 

That's how popup works, as it is a screen inside an iFrame. 

You have two options. 

1. Notify the parent using Popup_editor_Notify, and the parent navigate away. 

2. Use a Modal instead of a Popup, as it is in the page, and a redirect will work normally. 

Cheers 

Hi thanks! I tried your suggestion and it worked but now i can't bring the variables from the pop-up to the new page, how can i do that?




Hi,

As Leonardo has mentioned above, use Popup_editor_Notify ServerAction before you close your Popup.
Notify passes a string, so you have to create a structure to store these attributes and JSONSerialize it (toolbar) and use its result in Notify. In your screen you will have an OnNotify action to receive this message (using GetNotify) where will you have to JSONDeserialize it (based on the same structure). After that, you will be able to access all values you need to Navigate to another screen.


See:

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Traditional_Web/Web_Logic_Tools/JSON_Serialize

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Logic/Implementing_Logic/Logic_Tools/JSON_Deserialize

https://www.outsystems.com/learn/lesson/1881/handling-json-data/

https://www.outsystems.com/forums/discussion/42786/how-to-get-the-record-info-in-a-popup-from-parent/