File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Make it so: Java DB Connections & Transactions this week in the JDBC 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: 15385
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):

I agree. Here's the link:
subject: Scrollbars, simultaneously
It's not a secret anymore!