[Javascript] Scroll a multiline textarea
John Warner
john at jwarner.com
Mon Oct 30 08:33:23 CST 2006
Thanks, that's what I needed was a good start on the problem.
John Warner
-----Original Message-----
From: javascript-bounces at LaTech.edu
[mailto:javascript-bounces at LaTech.edu] On Behalf Of Aaron Bassett
Sent: Monday, October 30, 2006 8:44 AM
To: [JavaScript List]
Subject: Re: [Javascript] Scroll a multiline textarea
function scrollToBottom(el) {
el.scrollTop=el.scrollHeight;
}
will make the textarea jump to the last line - could probably do with
more work and only tested in FF2 win
but hopefully will set you on the right track.
cheers
On 10/30/06, John Warner <john at jwarner.com> wrote:
Is there a way to scroll a textarea using Javascript, what I want to do
is scroll the text without the user taking action with the mouse. Say I
have a text area sized to show say 5 lines of text but actually contains
say 25 lines of text, can I either style or using JS cause the text area
to scroll to the bottom? Any ideas on how?
Thanks
John Warner
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
More information about the Javascript
mailing list