...

View Full Version : Auto Refresh This Script?



neilzomg
08-25-2011, 06:15 PM
Been trying to get this auto refreshed instead of clicking to refresh

<center><iframe src="http://orange.citrus3.com:8338/played.html" width=800 height=400 frameborder=0 scrolling=no id="myiframe"></iframe></center><br>
<center><b><BIG><body link="#FF0000"><a href="javascript:myiframe.document.location.reload()">Refresh Current Song</a></BIG></b></center>

Philip M
08-25-2011, 06:46 PM
Use a META refresh:-

<meta http-equiv="refresh" content="30">

where "30" is the number of seconds.


Or a Javascript solution:-


<script>
window.setInterval("reloadIFrame();", 30000); // 30 seconds
function reloadIFrame() {
window.frames["iframeName"].location.reload();
}
</script>
But auto refresh is sometimes disapproved of as it can disorientate the user.


All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

neilzomg
08-25-2011, 07:20 PM
The script still isn't working. I cant meta tag it as i cant refresh the whole page as it would interrupt the live stream!

DanInMa
08-25-2011, 07:35 PM
any kind of refresh is going to load the entire page base don your description. do you want the song title to refresh or something?

neilzomg
08-27-2011, 02:17 PM
Yep, i just need the song title to refresh is all. Because when the stream changes track the current playing song sticks on the one that was on when you loaded the page.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum