function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
edoardo_spanoedoardo_spano 

Rerender parent page from iframe

Hi All,

In the standard homepage I've inserted a custom HTML component that contains an iframe to a Visualforce Page.
In this page I've inserted a button.
I would that when the button is clicked, the homepage is redirected to another page, and not the iframe as is now.

How I accomplish it.

Thanks in advance.
Best Answer chosen by edoardo_spano
Elie.RodrigueElie.Rodrigue
you could call window.top.location.href = "http://www.google.com" ; from your iframe's button code and this should redirect the main browser.

All Answers

Elie.RodrigueElie.Rodrigue
you could call window.top.location.href = "http://www.google.com" ; from your iframe's button code and this should redirect the main browser.
This was selected as the best answer
edoardo_spanoedoardo_spano
Thank you Elie, it works!
Marco ZeuliMarco Zeuli
Guys do you know if this will be still supported with new Summer 15 release? 
In the release note it's said: 
May contain JavaScript, but the JavaScript will not be able to interact with the page containing the iframe as Visualforce pages are served on a different domain.

thx ;)