Detect scrollbar arrowbutton clicks in mozilla.

M

Marek Mänd

Is there a trustworthy way to detect mouse clicks on the native
scrollbar arrow buttons (scrolluparrow and scrolldownarrow) in Mozilla?

Why?
Having a scrollable table i want to fetch more data from server and
append it as table rows if the scrolling is at the end position and i
press again on scrolldown. Without trying my intuition tells me that
onscroll isnt gonna work as there is nothing to scroll down at the end
of scrollable area.
 
C

c.anandkumar

Do you really need the scrollbar to be present around ur table? Or you
could just use text links for allowing the user to scroll up or down.or
emulate scroll bars using layers.
 
M

Marek Mänd

Do you really need the scrollbar to be present around ur table? Or you
could just use text links for allowing the user to scroll up or down.or
emulate scroll bars using layers.

Well I could emulate too (which I am familiar of), but if possible it
would be nicer to have the functionality with native scollbars.
 
C

c.anandkumar

Well, I could think of one possible solution and that is to have an
empty row always on the bottom of the table or some amount of blank
space at the bottom always _and_ disabling scrolling beyond the last
row. Say you have the table contents upto y=n and you have some blank
space B after it, a scroll to the bottom most portion with y=n+B will
definitely trigger an onScroll event. You could capture this event and
figure out if the user has scrolled after the last row, in which case
you could scroll up using window.scrollBy with an appropriate offset.
 
M

Marek Mänd

Well, I could think of one possible solution and that is to have an
empty row always on the bottom of the table or some amount of blank
space at the bottom always _and_ disabling scrolling beyond the last
row. Say you have the table contents upto y=n and you have some blank
space B after it, a scroll to the bottom most portion with y=n+B will
definitely trigger an onScroll event. You could capture this event and
figure out if the user has scrolled after the last row, in which case
you could scroll up using window.scrollBy with an appropriate offset.

Thank you for this creative workaround idea.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top