Prevent iFrame reloading

Hey everyone,

I’m trying to implement a tab like appraoch to enable switching between different websites displayed in iFrames. However it appears to me iFrames reload the given website when set invisible and visible again (?).

When I create two blocks with iFrames in them and set the block position to absolute, I am able to overlay them. However, when I try to make this dynamic by feeding a list of urls as repeater logic for a block with an iFrame in it, the iFrames instead split the screen.

Does anyone know how I can have mutliple iFrames open at the same moment, but only one displayed?

Hello @Anton_Henkelmann

However it appears to me iFrames reload the given website when set invisible and visible again (?).

Could you tell me how you manage that? If you trying to do it using our Display property or Visibility handlers - it is an expected behavior, because the Iframe component is unmounted.

You could try to manage visibility using style properties(CSS) in the Styles Logic handler. Not obviously, but these style properties have the same name as our system properties: visibility and display

That could looks like:

image

Regards, Dima.

Hey Dima,

Thanks for the fast reply. Your solution sounds promising. However I fail to recreate what you showed here. I used the blocks shown in the following picture.

If I understand the logic correctly I would expect that nothing is visible. However both iFrames are visible again and split the screen.

Best,
Anton

Hi @Anton_Henkelmann

try to use hidden string instead of false boolean

Regards,
Vlad

This works just perfectly fine! Thank you :slight_smile:

1 Like