1

With Summer '14 moving things from HTML Areas to VisualForce Areas one problem I've seen is that links in the iframe won't work properly. Since they are in the iframe they load in the iframe, not in the browser as a whole.

Is there a workaround for this? I might create a sidebar component as a VF Area component and it has a list of links to other records, for example. The intended behavior would be that I could click on a link and it would load as the main page. The current behavior is that it would load in the sidebar/iframe.

There is JavaScript to break out of an iframe but in my experience the interaction isn't very clean for the user. It often loads the page first, then breaks out of the iframe, causing a clunky delay and transition.

The problem also exists if you link to something from a Visual Force Console Component, which is the same basic problem of SFDC making everything live in an iframe.

1
  • Does using target="_top" in your anchor tag work? – daveespo Jul 30 '14 at 18:20
2

I just ran into this same issue today. I just changed my hyperlinks to have the target attribute set to "_top" and it seems to work. Example:

<a href="/{!o.Id}" target="_top">{!o.Name}</a>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.