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
dgindydgindy 

IFrame Top Window

I have a Visualforce page in an Iframe and when I click on it in developer mode and it loads in the top window.  But it doesn't load on the top level for non developer mode.  I want this to happen in none developer mode with out having to re-write my entire VF app.  Any ideas?
Thanks
dchasmandchasman
It sounds to me like you have one or more links in your VF page that need to be targeted at "_top" - can you post your page here to allow us to better understand what is going on? Developer mode uses iframes also and if you are framing your own content then targets for links become very important. I suspect we should be able to get things the way you need them to be w/out resorting to anything as drastic as "re-writing your entire VF app" though :smileyhappy:


Message Edited by dchasman on 07-12-2008 03:46 AM
kremlachkremlach
I am also having this problem.  I have a page that I am embedding in a standard detail page which have links that I want to go to a new page.  This works in the sandbox, but not in production, where the link opens within the iframe.  If things work differently between the sandbox and in development, then it's very hard to track down a solution.  Here is the code that opens the new window (which is straight from the documentation):

    public PageReference showOpportunity() {
String opportunityID = ApexPages.currentPage().getParameters().get('opportunityID');
PageReference opportunityPage = new PageReference('/'+ opportunityID );
opportunityPage.setRedirect(true);
return opportunityPage;
}

kremlachkremlach
I was able to remedy this without re-deploying by adding a target="_top" to the commandlink on the corresponding page.  But the fact remains that I did not need to do this in the sandbox.