View Full Version : scroll up one line at refresh

08-21-2004, 01:36 PM

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.

08-22-2004, 06:00 AM
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.


08-22-2004, 09:41 AM
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.