Do you have a question? Post it now! No Registration Necessary. Now with pictures!
February 27, 2004, 11:31 pm
rate this thread
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?
Re: Scrolling log files
I assume you use some server side coding to do that too, so why not toss
your output from the script into an array and reverse that array?
Then you output the reversed array and the newest entries of your logfiles
will always be at the top of the textarea.
Registeret Linux user #292411
- » ABBR and ACRONYM are for user agents not for end users
- — Previous thread in » HTML Markup Language