Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 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
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,732
    Thanks
    202
    Thanked 2,508 Times in 2,486 Posts
    Use a META refresh:-

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

    where "30" is the number of seconds.


    Or a Javascript solution:-

    Code:
    <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.
    Last edited by Philip M; 08-25-2011 at 05: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
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    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?

  • #5
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

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