Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vertical Scrollbar behavior

Status
Not open for further replies.

masoal

Programmer
Mar 26, 2002
15
ES
Hi all:
I need to control the vertical scrollbar tion of a page when the user hits an arrow. The problem is that the page is like a list or text area control and the behavior should be like this: only when I'm at the bottom of this list the scroll should go down and not at every hit of the arrow. Every item of the list is a DIV element, so I've intended to scroll at a certain position depending on the DIV viewed but I can't manage to work it. How can I know if the DIV is within the viewed area?

I dont't know if that's the best way to do it so if you think there's a better way it'll be welcome.

Thanks,
Marc

 
i dont understand you, can i have some kind of an example link???

Known is handfull, Unknown is worldfull
 
Sorry, but it isn't uploaded and I just can explain what I want to do:
The normal behavior of a vertical scrollbar in a web page is to scroll at every hit on the down/up arrow. As my page is like a list control where each line is a different item (table row) and I highlight the selected item/line, I want the page not to scroll until it's reached the last visible item ... like a textarea but where each line is an independent item.

Does it helps?

 
o.k this is what i understand:
u have a dropdown contiaining divs(hidden), event before the divs are displayed a scroll appears (making the page look empty)???

Known is handfull, Unknown is worldfull
 
No, it isn't a dropdrown: the items are always displayed, that's why I say it's like a textarea ... maybe it's better to compare it with the Windows "Add/Remove Program": a web page but with the scrollbar behavior customized.

What I've done until this moment is to catch every event of the vertical scrollbar (OnScroll) to determine if the scroll have to move (if the simulated focus have reached the bottom of the page) or not because the selected item is at the beginning/middle of the page.

Any other way to do it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top