How to force refresh/reload of iFrame component?

I need to programmatically update the pageUrl of an iFrame component and force a reload of the component. Changing the pageUrl doesn’t seem to trigger a reload of the component. Any ideas? Thanks.

Hey @sfbrophy! Sorry for the delay here, my bad :slight_smile:

It doesn’t look like we support this as of current - what’s your use case, exactly?

I was just looking for the same thing… my use case is we’re using a iFrame as a preview window that allows the user to select from a list in order to preview the selected URL. In the absence of being able to change the iFrame pageUrl, our workaround is to create a separate iFrame component for each URL, hiding each and layering them on top of one another, then hiding/showing the correct one as the user selects. Awful solution (difficult to maintain and carries way too much overhead). We’d really love to be able to just dynamically change the pageUrl of a single iFrame as needed.

1 Like

Hey @sfbrophy & @laurab
There might be a better way, but this solution for refreshing & changing the URL seems to work for me:
I use two chained Javascript queries
The first one sets the page url value to be be blank:url.setValue(" ")
The second one changes the url to the targeted value : url.setValue(“”)
I use a text input field (called url) as an intermediary between the queries and the pageURL, and then set the page URL to {{url.value}}
Here is an example with Muffins & Wikipedia:

Hope this is what you were looking for! You could probably hide the textInput if you don’t want it to be able to be changed manually.

1 Like

@JoeyKarczewski - Thank you for the idea! I will definitely play with this over the next week or so to see if it meets our needs.