Need Help With iframe Refresh

Joined
Jan 8, 2008
Messages
1
Reaction score
0
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()">
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top