how to autoscroll a html page

Discussion in 'JavaScript' started by silentbody, Feb 16, 2009.

  1. #1
    Hi all, I'm really new here.

    I have a little issue: I have a script that has 2 html pages to display and it does it after about 10 seconds and then it goes from the beginning. I need to make a single html page that rolls down (scrolls) continuously.

    Here is the code for what the script is now doing:

    function start(){
    if( films_array.length > 0 ){
    Element.show('full_page');
    load_banner_logos();
    scale_font();
    display_current_time();
    refresh_page();
    } else {
    next_page();
    }
    }

    function display_current_time(){
    var now = new Date();
    var time = format_time( now );
    var html = align({horizontal: 'left', vertical: 'middle'}, 'Current Time: ' + time);
    $('time_clock').innerHTML = html;
    setTimeout( 'display_current_time();', template.current_time_refresh_ms);
    }



    function refresh_page(){
    if( template.all_films_shown ){
    next_page();
    } else {
    update_page();
    setTimeout( 'refresh_page();', template.refresh_time * 1000);
    }
    }

    function next_page(){
    template = null;
    default_font = null;
    target_size = null;
    films_array = null;
    screen_array = null;
    $('URLForm').submit();
    }



    </head>
    <body onload="start();">


    I've tried with scrollBy function but it still doesn't work.


    Can anyone help me?


    Regards,

    Bogdan
     
    silentbody, Feb 16, 2009 IP
  2. geoiss2004

    geoiss2004 Guest

    Messages:
    1,454
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    0
    #2
    look on www.ultimate-guitar.com, they have something similar and you might be able to get ideas from the javascript
     
    geoiss2004, Feb 16, 2009 IP
  3. silentbody

    silentbody Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I didn't find anything that may relate to my problem.
     
    silentbody, Feb 16, 2009 IP
  4. geoiss2004

    geoiss2004 Guest

    Messages:
    1,454
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    0
    #4
    geoiss2004, Feb 16, 2009 IP