+ Start a Discussion
SRajesh8SRajesh8 

How to refresh or reload embedded vf page in detail page

HI,

How to refresh or reload the embedded vf page not whole detail page.

Thanks in advance.
Sunil MadanaSunil Madana
Hi, below code should work.
<apex:page id="myPage">    
    <apex:form id="myForm">
        <apex:iframe height="600" id="theIframe" scrolling="true" src="https://www.salesforce.com" width="100%"/>
    </apex:form>
    <script>
        window.setInterval("reload();", 30000);
        function reload() { document.getElementById('theIframe').src += ''; }
    </script>
</apex:page>

Appreciate your feedback to this answer, if it works.

Thanks, Sunil
Sunil MadanaSunil Madana
If the above suggestion(s) worked, appreciate your time tolet us know by marking the answer as "Best Answer" right under the comment which will help the rest of the community should they have a similar issue in the future. Thanks.
SRajesh8SRajesh8
Hey sorry for delay,

There is standard detail page for eg: Account and in that we have embedded the Account vf page,having the close button, when we click that button needs to reload the page loads to initial stage but not load of entire detail page.

Thanks,
Rajesh