# Scrolling text area

**URL:** <https://forum.kirupa.com/t/scrolling-text-area/221756>\
**Category:** web dev\
**Created:** [April 7, 2007, 1:36am UTC](https://forum.kirupa.com/t/scrolling-text-area/221756 "2007-04-07T01:36:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pherank](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pherank](https://forum.kirupa.com/u/Pherank)\
**Post date:** [April 7, 2007, 1:36am UTC](https://forum.kirupa.com/t/scrolling-text-area/221756/1 "2007-04-07T01:36:20Z")

</div>

I’m having trouble implementing a text area scroller: “button\_scroller.html” shows the original code working as it should - when you get to the bottom of the list the scrolling automatically stops.

“scroll\_text.html” is my working version. Click on a menu item to see its corresponding list. This one will keep scrolling indefinitely - why? Also, I’ve been trying to implement an addition: when you click on a menu item the scrolling text area should return to the top of the text area, but adding -

```auto
document.getElementById(id).style.scrollTop = 0;

```

to the javascript isn’t working. How should this be implemented? Thanks for any help.
