zoffmann
12-21-2007, 09:39 AM
I got the following script to adapt it, but I discovered that the script doesn't work in firefox, I wonder why.
The script is supposed to change pages automatically in browser for given amount of time. Try it in IE.
Any help is appreciated.
<html>
<head>
<title>URL Switcher</title>
<script language="JavaScript">
var i = 0;
var url_array = new Array();
url_array[0] = "http://fr.youtube.com/watch?v=IBj1aJBvjYE&feature=related";
url_array[1] = "http://fr.youtube.com/watch?v=qjSOz5w1GHI";
url_array[2] = "http://fr.youtube.com/watch?v=IifX6TbZuuQ";
url_array[3] = "http://www.friends-dating.co.uk/action_home+page.htm";
url_array[4] = "http://fr.youtube.com/watch?v=T4jdhGKekCo";
url_array[5] = "http://fr.youtube.com/watch?v=J7EY7wYhxow";
function changeURL(ms) {
document.frames['my_frame'].location.replace(url_array[i]);
i = (i+1)%url_array.length;
setTimeout("changeURL("+ms+")", ms);
}
</script>
</head>
<body style="margin:0px; overflow-y:hidden" onLoad="changeURL(5000);">
<iframe name="my_frame" width="100%" height="100%" border="0" frameborder="0"></iframe>
</body>
</html>
The script is supposed to change pages automatically in browser for given amount of time. Try it in IE.
Any help is appreciated.
<html>
<head>
<title>URL Switcher</title>
<script language="JavaScript">
var i = 0;
var url_array = new Array();
url_array[0] = "http://fr.youtube.com/watch?v=IBj1aJBvjYE&feature=related";
url_array[1] = "http://fr.youtube.com/watch?v=qjSOz5w1GHI";
url_array[2] = "http://fr.youtube.com/watch?v=IifX6TbZuuQ";
url_array[3] = "http://www.friends-dating.co.uk/action_home+page.htm";
url_array[4] = "http://fr.youtube.com/watch?v=T4jdhGKekCo";
url_array[5] = "http://fr.youtube.com/watch?v=J7EY7wYhxow";
function changeURL(ms) {
document.frames['my_frame'].location.replace(url_array[i]);
i = (i+1)%url_array.length;
setTimeout("changeURL("+ms+")", ms);
}
</script>
</head>
<body style="margin:0px; overflow-y:hidden" onLoad="changeURL(5000);">
<iframe name="my_frame" width="100%" height="100%" border="0" frameborder="0"></iframe>
</body>
</html>