views:

38

answers:

2

Hi,

I need to refresh an iframe with asynchronous time intervals. The asynchronous time interval is calculated in the server side. Also, the user shouldn't able to feel the refresh in the whole page. It is ok if he finds that the iframe is refreshing in certain intervals.

A: 

If the iframe is a page in your site, use a meta tag on the page showing in the iframe

<meta http-equiv="refresh" content="60">

content is in seconds

UPDATE

If using PHP

<meta http-equiv="refresh" content="<?=$refresh_interval?>">

Where $$refresh_interval holds the value of refresh interval according to the server

Pablo
Thanks for your reply. But the time should be in asynchronous time intervals. I don't have that time. The time is in server side. Also Using the above code the user feels that the whole page is getting refreshed.
Multiplexer
this tag will go in the page that the iframe is displaying not in the parent page of the iframe. And it should be easy for you to pass some data from the server. i've updated my answer.
Pablo
Sorry if I express it wrongly. By using the above code I can see the whole page looks refreshed even though the iframe alone refreshes. I can see a status in the status bar. I don't want to see any status n the status bar.
Multiplexer
A: 

If you don't want to see a status bar then you need to implement an AJAX request/callback and update the content that way.

You can always get the html page as an AJAX response and update the content of the iframe with that response.

This article details exactly what you are trying to do.

starskythehutch