[Greasemonkey] make browser scroll to an element
Pramod Biligiri
pramodbiligiri at gmail.com
Mon May 16 22:04:15 EDT 2005
Hi,
How do I make the browser scroll to a specific element on the page, in my
case
an anchor tag generated dynamically using GreaseMonkey and having a fragment
identifier.
I tried element.focus() ..not much use. Puts the keyboard focus there, but
scrolling
is awry.
There's a window.scrollTo(x, y) function I'm trying to use. But how do I get
the
x,y co-ordinates of the element with respect to the window?
Any other tricks/suggestions?
Thanks,
Pramod Biligiri
--
We're hiring:
http://blogs.applibase.net/pramod/index.php/archives/we-are-hiring
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/greasemonkey/attachments/20050516/93cd95a2/attachment.htm
More information about the Greasemonkey
mailing list