+ Start a Discussion
Marco ZeuliMarco Zeuli 

Home page Visualforce component - Summer 15 release, redirect parent window

Hi guys,

i have a doubt:

with new release Summer 15 it's said to:
You can include JavaScript in your Visualforce page, but because the component is rendered in an iframe on the home page layout, the JavaScript can’t interact with the page that contains the component.

So my question is:

If i have an Homepage Visualforce component, with this element inside:
<apex:column headerValue="Work Approval" id="workApproval">            
              <button type="button" onclick="window.top.location.href = '{!URLFOR(o.link)}'">Work</button>
</apex:column>

Will the "onclick" action still works? Or not, because it interact with the parent window?

Thxs guys ;)
SlashApex (Luis Luciani)SlashApex (Luis Luciani)
Hi Marco,

Your code should continue to work since you are doing the redirect using window.top.