Topic awaiting preservation: Moz Help.... |
|
---|---|
Author | Thread |
Bipolar (III) Inmate From: UK |
posted 01-24-2003 13:55
trying to get the last element in a div to scroll into view. Obviously this is simple in IE, but can't get it in NN7. |
Bipolar (III) Inmate From: Berlin (almost) |
posted 01-24-2003 15:57
The scrolling code itself should work in both IE and Mozilla (I'm not sure where the five ***** came in though - was that the UBB?), but instead of checking for document.all, which is only supported by IE, you should check for document.getElementById in the if statement. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 01-24-2003 16:10
I was pretty sure the scrollTo function was only a method of the Window object, not of any object you wanted to use it on... |
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
posted 01-24-2003 16:17
The poster has demanded we remove all his contributions, less he takes legal action. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 01-24-2003 17:32
What you probably want to do, is use window.scrollTo(x,y), where x and y are the position of the element on the page. |
Maniac (V) Inmate From: Brisbane, Australia |
posted 01-25-2003 02:04
Hay, that's a really really neat way of getting top and left values of nested elements relative to the page. I'd never thought about doing it that way before. |