0

HTML Auto Scrolling?

Hi Guys!

im in a pickle, im trying to display a excel sheet that is streamed as a HTML page and i need to to auto scroll every couple hours, i figured i could use a time event but i have no idea how to make the page scroll on its own, any ideas?

1 comment

  • 0
    Avatar
    Mark Richards

    I've used marquee in the past to achieve the scrolling effect on brightsigns, though this has now been superseded by CSS animations (which I've not tested in a brightsign).

     

    I've also used event listeners on web pages on Brightsigns to trigger something to happen a period after the page has loaded.

     

    So you could try something like:

    Wrap your sheet in a marquee object:

      <body>
      <!-- scroll stuff -->
        <marquee class="GeneratedMarquee" id="scroll-list" direction="up" scrollamount="0" scrolldelay="100" behavior="scroll" vspace="0px" style="height:200px;">
          <p>Stuff1</p>
          <p>Stuff2<p>
        </marquee>
      </body>

    Then use a script on the page to change the scollAmount of the marquee in the DOM:

    <script>
    function timedRefresh(5000) { <!-- do something after 5 seconds -->
        document.getElementById("scroll-list").stop();
        document.getElementById("scroll-list").scrollAmount=6;
        document.getElementById("scroll-list").start();
    }

    if (window.attachEvent) {window.attachEvent('onload', timedRefresh(5000));}
    else if (window.addEventListener) {window.addEventListener('load', timedRefresh(5000), false);}
    else {document.addEventListener('load', timedRefresh(5000), false);}
    </script>

     

Please sign in to leave a comment.