PDA

View Full Version : Accessing scrollbars of overflown <div>?


Rikimaru
06-24-2002, 01:36 PM
Howdy all,

I've checked everywhere for a way to access the scrollbars that appear when you set a div overflow to scroll. Has anyone been able to do this?

Here's what I'm trying to do (I'm not requesting a script, just trying to give an idea of my intentions):

I've got a layer that is 1400px wide, way larger than the standard resolution we use at work. Because it's so large, and there's no way around that, someone suggested I add something similar to Adobe's navigator palette. I'm sure it can be done...I just can't find a way to access the scrollbars from the 'master' layer.

Any hey, if anybody else thinks of a better jumping off point, let me know. I've been racking my brain all weekend over this.

jkd
06-24-2002, 06:26 PM
What do you mean, access the scrollbars?

Like, have scrollTo/scrollBy methods?

Rikimaru
06-25-2002, 02:26 PM
Yes, I was hoping to access them like the document scroll bars, but I can't find any methods or properties to work with regarding them. Instead, and probably more efficient, I made my own scroll arrows, and just dynamically scroll the layer based on my needs. Plus, it looks nicer than using those ugly scrollbars.

Still, it would be nice to know if it was possible.

jkd
06-25-2002, 05:17 PM
Umm, if you have an element with overflow: scroll, the only only thing that changes from the JS side to my knowledge is that element.onscroll starts firing when that element is scrolled.