Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Scrollbar firing/clicking events

2 views
Skip to first unread message

Vasu

unread,
Dec 16, 2009, 4:44:22 AM12/16/09
to
Hi Guys,

How can I get a firing/clicking event in XUL scrollbar. I have a box
where, when I refresh the content using DOM creation and deletion, I
want to have user get the top of the page for every DOM refresh.

I tried many tricks with the js like window.scrollTo, etc.. no luck so
far. Appreciate if you have solution/trick for above issue.

thanks

pat

unread,
Dec 17, 2009, 11:51:05 AM12/17/09
to

if you want to scroll after updating the box try getting a reference
to nsIScrollBoxObject from your box:
var scrollBoxInterface = yourbox_element.boxObject.QueryInterface
(Components.interfaces.nsIScrollBoxObject);
and calling whichever method (listed here
http://mxr.mozilla.org/seamonkey/source/layout/xul/base/public/nsIScrollBoxObject.idl)
that suits your purpose.
haven't tried this yet myself but came across it trying to figure out
how to do something similar.
pat

Vasu

unread,
Dec 18, 2009, 4:51:50 AM12/18/09
to
Thanks. Let me try this suggestion as well. I was trying to keep the
dom manipulation code as simple as possible so that porting the code
over to web would be easy.

0 new messages