|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am trying to make an iframe with multiple refreshes. I would like my iframe to refresh to a different url each time and dont know if this is possible. If possible I would like it to automatically refresh every 7-10 seconds. So if someone can provide me some usefull information i would very so much appreciate it. Thanks
|
|
#2
|
|||
|
|||
|
Um ok, guess no one knows how to do it or im just being ignored. :\
|
|
#3
|
||||
|
||||
|
here you go
wow, you give up fast. ppl are not around here 24/7 you know.
anwyays, try such code: Code:
<script>
var arrURL=new Array("http://www.yahoo.com", "http://www.google.com", "http://www.ynet.co.il");
var curIndex=0;
var timer=0;
var refreshRate=10; //seconds
function ChangeFrame()
{
clearTimeout(timer);
var url=arrURL[curIndex];
window.open(url, "Frame1");
curIndex = ((curIndex+1)%arrURL.length);
timer = setTimeout("ChangeFrame()", refreshRate*1000);
}
</script>
<iframe name="Frame1" id="Frame1" src="about:blank" width="500" height="300"></iframe>
<input type="button" onclick="ChangeFrame();" value="Start" />
this code would change the location of the frame once button is clicked, you can define the urls and refresh rate. Last edited by Shadow Wizard : November 18th, 2004 at 08:32 PM. Reason: fixed the code |
|
#4
|
||||
|
||||
|
Alternativly, just use <meta refresh> in each page of the iFrame provided that each iframe src="" will be located on your website, or you have control over them
Contrary to what many people "think"... meta refresh was developed for THIS REASON Meta refresh is NOT meant to be used for redirections... for that, you use Response.Redirect("") or whatever method you can use for returning a HTTP300 with your SSSL |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Multiple IFrame Refresh |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|