Scrolling a log file in a page

C

Chris

I got a log file I'd like to scroll on the screen as new entries are added
to the bottom. So far, I've written a little code that grabs the last X
lines from the file and displays them in a < textarea >. The user hits
"refresh" to see more recent entries.

The trouble is that I can't get the textarea to scroll to the bottom so the
most recent entries are visible.

1. Is there a way to get textarea elements to automatically put the cursor
at the bottom?
2. More generally, is there a better way to do this user interface?
 
C

Chris

Maarten said:
Show the last entries first.

today
yesterday
day before
-4
-5

I'd rather not, because that means that the order of the entries on the
screen will be different from the order that the user will see in a text
editor. Advanced users will be using text editors a fair amount.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top