Need an iframe to auto refresh


Taylor Tracy

I'm running into a situation where the iframe needs to be refreshed about every 30 seconds. I've browsed the forums and tried a few things with no success.

<iframe id="Doyle" src="http://www.dot.ca.gov/dist2/rwis/sm_doyle.php" 
width="375" height="560">
</iframe>

<script>
window.setInterval("reloadIFrame();", 3000);

function reloadIFrame() {
 document.frames["Doyle"].location.reload();
}
</script>

Any suggestions on how to make this work?

Vikas Sardana

use the following code

<iframe id="Doyle" src="http://www.dot.ca.gov/dist2/rwis/sm_doyle.php" 
width="375" height="560">
</iframe>

<script>
window.setInterval("reloadIFrame();", 30000);

function reloadIFrame() {
 var frameHolder=document.getElementById('Doyle');
frameHolder.src="http://www.dot.ca.gov/dist2/rwis/sm_doyle.php"
}
</script>

Check working example below

http://plnkr.co/edit/Mre0AgMjh5o7wXl5YvVP?p=preview

Related


Need an iframe to auto refresh

Taylor Tracy I'm running into a situation where the iframe needs to be refreshed about every 30 seconds. I've browsed the forums and tried a few things with no success. <iframe id="Doyle" src="http://www.dot.ca.gov/dist2/rwis/sm_doyle.php" width="375" height=

Need an iframe to auto refresh

Taylor Tracy I'm running into a situation where the iframe needs to be refreshed about every 30 seconds. I've browsed the forums and tried a few things with no success. <iframe id="Doyle" src="http://www.dot.ca.gov/dist2/rwis/sm_doyle.php" width="375" height=

Need an iframe to auto refresh

Taylor Tracy I'm running into a situation where the iframe needs to be refreshed about every 30 seconds. I've browsed the forums and tried a few things with no success. <iframe id="Doyle" src="http://www.dot.ca.gov/dist2/rwis/sm_doyle.php" width="375" height=

Need an iframe to auto refresh

Taylor Tracy I'm running into a situation where the iframe needs to be refreshed about every 30 seconds. I've browsed the forums and tried a few things with no success. <iframe id="Doyle" src="http://www.dot.ca.gov/dist2/rwis/sm_doyle.php" width="375" height=

Need an iframe to auto refresh

Taylor Tracy I'm running into a situation where the iframe needs to be refreshed about every 30 seconds. I've browsed the forums and tried a few things with no success. <iframe id="Doyle" src="http://www.dot.ca.gov/dist2/rwis/sm_doyle.php" width="375" height=

Repeat auto-refresh IFrame every 5 minutes

Groulich I have an iframe that I need to refresh every five minutes. I have the following, but it just refreshes on time. I need it to refresh every five minutes. <table class="auto-style7"> <tr> <td class="auto-style4">

Auto refresh tableview without refresh

Kim Jae Jae I would like to know how to automatically refresh the table view without having to pull down to refresh. So I try to set NSTimerand call the function that has reloadData(). But it didn't work. In other words, I did: @IBOutlet weak var allPrayerRequ

Auto refresh tableview without refresh

Kim Jae Jae I would like to know how to automatically refresh the table view without having to pull down to refresh. So I try to set NSTimerand call the function that has reloadData(). But it didn't work. In other words, I did: @IBOutlet weak var allPrayerRequ

Auto refresh tableview without refresh

Kim Jae Jae I would like to know how to automatically refresh the table view without having to pull down to refresh. So I try to set NSTimerand call the function that has reloadData(). But it didn't work. In other words, I did: @IBOutlet weak var allPrayerRequ

Timer auto refresh on refresh page

Kunar Here I am facing a problem, I am preparing a quiz application in php and I am facing a problem when the user starts to test if the timer is working correctly. When the user asks the second question, the timer starts again, here is my code:- window.onload

SSRAS auto refresh and auto paging

mortal I'm trying to get reports to work in "kiosk" mode to display on a large plasma screen and refresh every 30 seconds. I know how to set the "AutoRefresh" property to 30 seconds. But what I don't know is how to move the report to the next page on every ref

SSRAS auto refresh and auto paging

mortal I'm trying to get reports to work in "kiosk" mode to display on a large plasma screen and refresh every 30 seconds. I know how to set the "AutoRefresh" property to 30 seconds. But what I don't know is how to paginate the report to the next page on every

SSRAS auto refresh and auto paging

mortal I'm trying to get reports to work in "kiosk" mode to display on a large plasma screen and refresh every 30 seconds. I know how to set the "AutoRefresh" property to 30 seconds. But what I don't know is how to paginate the report to the next page on every

How to refresh iframe url?

test user I'm using ionic to create an app where iframes are being used to display URLs. Here is the HTML code: <iframe id="myFrame" width="100%" height={{iframeHeight}}> Here is the angular js: $scope.iframeHeight = window.innerHeight;

Refresh iframe content in AngularJS

Amash I am writing an application which is part of Angular and jQuery. I separate them by loading the jQuery content in an iFrame. I need to refresh the iFrame on some event (eg click on ng). My controller contains the following code: $scope.refreshIframe = fu

How to refresh iframe url?

test user I'm using ionic to create an app where iframes are being used to display URLs. Here is the HTML code: <iframe id="myFrame" width="100%" height={{iframeHeight}}> Here is the angular js: $scope.iframeHeight = window.innerHeight;

Refresh iframe content in AngularJS

Amash I am writing an application which is part of Angular and jQuery. I detach them by loading the jQuery content into an iFrame. I need to refresh the iFrame when a certain event occurs (eg click on ng). My controller contains the following code: $scope.refr

Refresh iframe content in AngularJS

Amash I am writing an application which is part of Angular and jQuery. I detach them by loading the jQuery content into an iFrame. I need to refresh the iFrame when a certain event occurs (eg click on ng). My controller contains the following code: $scope.refr

target refresh iframe

Charles Fichte I have two frames nav.html and main.html which are included in a page called index.html. I have three image links, back, forward and refresh. main.html iframe has id="main" and buttons have their respective targets. Forward and backward work fin

Fade out and refresh in iframe?

culture I refresh the iframe every 20 seconds using the following src update method: function refresh(){ $('#1').attr('src',function(i, val){ return val; }); }; setInterval(refresh, 20*1000); Is there a way to make the refresh smoother by fading the ifra

How to refresh iframe url?

test user I'm using ionic to create an app where iframes are being used to display URLs. Here is the HTML code: <iframe id="myFrame" width="100%" height={{iframeHeight}}> Here is the angular js: $scope.iframeHeight = window.innerHeight;

Refresh iframe content in AngularJS

Amash I am writing an application which is part of Angular and jQuery. I detach them by loading the jQuery content into an iFrame. I need to refresh the iFrame when a certain event occurs (eg click on ng). My controller contains the following code: $scope.refr

Eclipse auto refresh faster

username I use Eclipse to just run my application. My main development uses an external editor (Atom). I turned on "Refresh using local hooks or polling" to enable Eclipse (details on periodic refresh here on how to do this). My problem is... On OSX (MacBook P

Eclipse auto refresh faster

username I use Eclipse to just run my application. My main development uses an external editor (Atom). I turned on "Refresh using local hooks or polling" to enable Eclipse (details on periodic refresh here on how to do this). My problem is... On OSX (MacBook P

Eclipse auto refresh faster

username I use Eclipse to just run my application. My main development uses an external editor (Atom). I turned on "Refresh using local hooks or polling" to enable Eclipse (details on periodic refresh here on how to do this). My problem is... On OSX (MacBook P

jQuery auto refresh page

Abigail P. Haridas I am trying to load the content of a file into a department using jquery. After loading the content, the page will automatically refresh. <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.j

Fast auto refresh of cells

User 9696953 I display this array.count in my tableView that I add or remove from another ViewController No timers and pull to refresh Or how to refresh when loadedCart.count haw changes? thanks class TestTABLEVC: UIViewController, UITableViewDataSource, UITab

Auto refresh on button click

Marcelonuñez I'm having a problem developing a sample app on React.js, when I click to auto refresh the whole page, so I can't see (just by debugging) if the button is executing the method. I share with you two components I developed AForm component import My

Eclipse auto refresh faster

username I use Eclipse to just run my application. My main development uses an external editor (Atom). I turned on "Refresh using local hooks or polling" to enable Eclipse (details on periodic refresh here on how to do this). My problem is... On OSX (MacBook P