Hi,
Total novice here when it comes to JAVA Script. I'm working on a personal web page that contains 4 iframes. The iframes contain live security camera links that I want to refresh every 15 seconds. I'm able to get a single iframe to reload, but have no clue how to get all 4 iframes on the same page to reload. Here's the code I have. If anyone can assist me with getting this to work for multiple iframes, I would GREATLY appreciate it.
The following is in the <head> tag:
<script language="javascript">
function reloadIt()
{
frm=document.getElementsByName("iframe_01")[0];//calls the iframe object to be refreshed
frm.src=frm.src;//or you can set the src to a new src.
setTimeout("reloadIt()",15000);//the function will run every 15000 miliseconds, or 15 seconds
}
</script>
And the following is in the <body> tag:
<body onload="reloadIt()">
Total novice here when it comes to JAVA Script. I'm working on a personal web page that contains 4 iframes. The iframes contain live security camera links that I want to refresh every 15 seconds. I'm able to get a single iframe to reload, but have no clue how to get all 4 iframes on the same page to reload. Here's the code I have. If anyone can assist me with getting this to work for multiple iframes, I would GREATLY appreciate it.
The following is in the <head> tag:
<script language="javascript">
function reloadIt()
{
frm=document.getElementsByName("iframe_01")[0];//calls the iframe object to be refreshed
frm.src=frm.src;//or you can set the src to a new src.
setTimeout("reloadIt()",15000);//the function will run every 15000 miliseconds, or 15 seconds
}
</script>
And the following is in the <body> tag:
<body onload="reloadIt()">