Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Scroll a multiline textarea


  • From: aaronbassett at gmail.com (Aaron Bassett)
  • Subject: [Javascript] Scroll a multiline textarea
  • Date: Mon Oct 30 07:44:33 2006

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@xxxxxxxxxxx> 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@xxxxxxxxxx
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.LaTech.edu/pipermail/javascript/attachments/20061030/2d6b442d/attachment.html