Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes HTML, CSS and JavaScript and the fly likes Scrollbars, simultaneously Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Scrollbars, simultaneously" Watch "Scrollbars, simultaneously" New topic

Scrollbars, simultaneously

Robertovich Wartins

Joined: Nov 21, 2006
Posts: 16

question about scrollbars: i need, that one scrollbar is scrolling if another scrollbar is scrolled (both are scrolling simultaneously). How can this be done?
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
look into onscroll and scrollTop or scrollLeft

Robertovich Wartins

Joined: Nov 21, 2006
Posts: 16

this is solution:

and this is example code (maybe some one needs), but works only on IE (firefox seems to doesn't support onScroll):

jQuery in Action, 2nd edition
subject: Scrollbars, simultaneously
Similar Threads
My popup like window wont appear scrollable, help, please.
TextArea scrollbar problem
Scrolling in a JScrollPane problem
JAVA move vertical scroll bar programatically by moving horizontal scroll bar.
Issue with scrollbar while printing