In comp.lang.javascript message
<11*********************@73g2000cwn.googlegroups.c om>, Thu, 14 Dec 2006
07:31:55, KJ <n_**********@mail.comwrote:
>Is it possible to scroll a window (a frame, actually) to a particular
element. For example, I have some elements near the bottom of the page
(which requires scrolling, maybe 2 or 3 pages worth to get to this
content), and I'd like to scroll the window to that element (in this
case, the element has markup: <strong class=highlight>some
text</strong>)?
Yes. <URL:http://www.merlyn.demon.co.uk/js-quick.htmdoes it.
Use an element with a working .focus method and script a call of that
method. It may be wise firstly to set focus to the very top or the very
bottom, to ensure consistent results. Test in various browsers, and/or
read the appropriate specification, wherever it may be.
You may need to add such an element. It cannot be hidden, but it need
not be conspicuous.
It's a good idea to read the newsgroup and its FAQ. See below.
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
<URL:http://www.jibbering.com/faq/ A FAQ for news:comp.lang.javascript.
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.