Web Analytics Made Easy -
StatCounter Auto Refresh This Script? - CodingForum


No announcement yet.

Auto Refresh This Script?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Auto Refresh This Script?

    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>

  • #2
    Use a META refresh:-

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

    where "30" is the number of seconds.

    Or a Javascript solution:-

    window.setInterval("reloadIFrame();", 30000);  // 30 seconds
    function reloadIFrame() {
    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.
    Last edited by Philip M; Aug 25, 2011, 01:52 PM.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.


    • #3
      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!


      • #4
        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?
        - Firebug is a web developers best friend! - Learn it, Love it, use it!
        - Validate your code! - JQ/JS troubleshooting
        - Using jQuery with Other Libraries - Jslint for Jquery/other JS library users


        • #5
          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.