Results 1 to 2 of 2

Thread: Refreshing an I Frame...

  1. #1

    Thread Starter
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    Unhappy Refreshing an I Frame...

    I would like to know how to refresh an I-Frame every 310 seconds by picking a random site from a list to go to,

    Here is the code so far...
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    
    <html>
    <head>
    <meta http-equiv="Refresh" content="310;" />
    <title>I Frame testing</title>
    <SCRIPT type="text/javascript">
         newurls=new Array()
         newurls[0]="1.htm"
         newurls[1]="2.htm"
         newurls[2]="3.htm"
    
     function picksite()
       {
         now=new Date()
         num=(now.getSeconds())%4
         top.location.href = newurls[num]
       }
     </script>
    </head>
    <body bgcolor="#ff0000" text="#00ffff"><CENTER>
    This should load a link in the IFrame every 310 seconds...(5 mins 10secs)
    <iframe name="001" noresize="" height="95%" width="95%" scrolling=yes>Load me...</iframe>
    </body>
    </HTML>
    Well any ideas?

    Basically the i Frame should pick from the list using th picksite() function but well it doesn't and i don't know why...

    Any one ?

    Oh yeah and if one link doesn't work i want a button that says 'Dead Link?' which then refreshes the entire page i think the code for this is...
    Code:
    <button Value="Refresh">Dead Link?</button>

    Thanks in advance

  2. #2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width