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 3 of 3
  1. #1
    New Coder
    Join Date
    Oct 2003
    Location
    The Netherlands
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    scroll up one line at refresh

    Hi,

    I am an absolute javascript nerd, but I am looking for a script that is able to scroll up needed lines if there is new data to show.

    Let me explain a little bit more:
    What I want is, selecting data from a database using php/mysql every x seconds and if there are new records in the db since the last time I selected the datatabase, read the new record(s), sroll up the field in which previous records where shown and then display the new line(s).

    I alreay do this using several iframes. The polling of the database is done in a hidden iframe and if there is new data to display, another iframe that is displaying the text is refreshed completely and scrolls down onload to the bottom position. This works fine until the complete text gets larger and gets worse when images are displayed.

    Maybe I can solve this problem using javascript. As said I am a javascript nerd(can read and understand). I know how to do the html/php/mysql thing.

    I hope there are some usefull tips or solutions.
    Fred

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    You can add an anchor tag with the database and have the anchor tag located at the position of the new text. When the page loads then the paged is opened at the anchor.

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    New Coder
    Join Date
    Oct 2003
    Location
    The Netherlands
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have tried this and it positions perfectly at the bottom of the screen. But the same problem occurs. While displaying the text in the view screen, you see the text that does not fit in the viewing window anymore, flashing by.

    For instance if the first line of the text is red, you see something red flashing by when the page reloads at lets say line 70.

    So I am looking for a solution the scrolls-up gentle and displays the new text at the bottom position.
    Fred


  •  

    Posting Permissions

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