Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Scrolling log files

Reply
Thread Tools

Scrolling log files

 
 
Chris
Guest
Posts: n/a
 
      02-27-2004
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?


 
Reply With Quote
 
 
 
 
Andreas Paasch
Guest
Posts: n/a
 
      02-28-2004
Chris wrote:

> 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?


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.

/Andreas
--
Registeret Linux user #292411
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
smooth scrolling & auto scrolling sillyputty Firefox 1 08-24-2007 02:10 AM
My.Log.Writeexception not writing to Application Event Log. =?Utf-8?B?VG9tIFdpbmdlcnQ=?= ASP .Net 0 01-20-2006 06:41 PM
Urgent Pls: Facing problem in reading Log information from Log file, created by IIS Amratash ASP .Net 0 04-13-2004 09:08 AM
Scrolling a log file in a page Chris Javascript 2 03-01-2004 07:05 PM
Need help on the Permissions needed to log to Event Log from ASP.NET? Henrik_the_boss ASP .Net 0 11-05-2003 10:14 AM



Advertisments