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
csreddy7799csreddy7799 

Problem with page redirect ifrom frame to another page

Hi, I have added visualforce page inside tab using <apex:dynamicComponent>. when i click on a button in visualforce page inside iframe, it's redirecting inside iframe only. How to redirect to another entire page out of iframe? 

Ankit AroraAnkit Arora

Am not sure how your re-directing to other page, so better try using JS to open the page in parent window. Or if you can post your code, I can help better.

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

csreddy7799csreddy7799

Hi Ankith,

 

        Actually i have created tab panel  and tabs inside tab panel using <apex:dynamicComponent>. In every tab i have added VFPs using 'iframe' since we can't use 'include' in dynamic components. The problem is when i click on the button in visualforce page inside iframe, the page is redirecting inside iframe only showing with header and  header and side bar. Now i want to display redirected page outside iframe. 

 

In Tab Panell:

component.apex.iframe ifmEst = new component.apex.iframe();
string strEst = '/apex/EstimatePage';//?id='+job.Id;
ifmEst.src=strEst;
ifmEst.scrolling=true;
ifmEst.height='300px';
 myTab1.childComponents.add(ifmEst);

 Estimate Page:

 

function jsf(){
         window.open = "/apex/hello";
        }
in controller: 

PageReference secondPage = new PageReference ('/apex/hello');
        secondPage.setRedirect(true);        
        return secondPage;

  Here when i click on button in EstimatePage, it is redirecting to hello page inside iframe only, i want to navigate to hello page out side iframe completly