Need Help With iframe Refresh

Discussion in 'Java' started by relliscmh, Jan 8, 2008.

  1. relliscmh

    relliscmh

    Joined:
    Jan 8, 2008
    Messages:
    1
    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()">
     
    relliscmh, Jan 8, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Grey_Brother

    Help with Iframe refresh

    Grey_Brother, Apr 9, 2007, in forum: HTML
    Replies:
    7
    Views:
    645
    J.O. Aho
    Apr 9, 2007
  2. Scott
    Replies:
    6
    Views:
    965
    [MSFT]
    Apr 14, 2004
  3. Daedalous
    Replies:
    3
    Views:
    726
    Daedalous
    Jan 16, 2004
  4. Nathan Carr
    Replies:
    0
    Views:
    274
    Nathan Carr
    Sep 17, 2004
  5. Xav
    Replies:
    2
    Views:
    85
    Evertjan.
    Nov 23, 2007
Loading...

Share This Page