Toggle Modal Inside a Web Block From Parent Screen?

Hello,

1. Is it possible to call a modal inside a web block from it's parent screen? Let say I have a web block with     a modal inside it, and I want to open / close the modal from the parent screen. 

If it's not possible then I have another questions. 

2. If I put a modal inside the parent screen and I put a web block inside the modal, is there any way to close the modal when I click something inside the web block?

Thanks!

Solution

Hello Kevin, 

1. Web block and its parent are isolated, so, the only way to change something inside a Web block. Is through refreshing the Web block and passing something trough input parameter. You could try to open the modal from preparation, but this seems a little messy and I am not sure it works. 

2. Yes. In OS11 you can have an event in the block. From inside the Web block you can trigger the event. In the wb parent you set a handler for this event (a Web Screen) and you have access to everything in the parent from it, as it is in the parent. So you can close the modal. 

Events are taught in the online training. 

Cheers. 

Solution

Eduardo Jauch wrote:

2. Yes. In OS11 you can have an event in the block. From inside the Web block you can trigger the event. In the wb parent you set a handler for this event (a Web Screen) and you have access to everything in the parent from it, as it is in the parent. So you can close the modal. 

Events are taught in the online training. 

Cheers. 

Works like wonder! thanks a lot Eduardo,

BTW, which online training taught about events?


Hi, 

Both mobile (OS10 and OS11) and web development (OS11) have presentations about block events :)

Cheers.