This method will scroll the window relative to its current position by the indicated amount. You can scroll in either the horizontal or vertical axis or even both at once.
Although the method is supported by MSIE and Netscape Navigator, they scroll in opposite directions vertically. It was probably too much to expect them to support the feature in the same way.
Vertical scrolling in Netscape Navigator moves in the reverse direction to MSIE. Because the standard is ambiguous on this point, you will need to check this on other implementations.
Netscape Navigator will only permit a document to be scrolled if the scroll bars are active and visible. MSIE does not care whether the scroll bars are visible or whether you are scrolling the document past its end point. Netscape Navigator however allows layers to be scrolled anyhow.
Prev | Home | Next |
Window.scrollbars | Up | Window.scrollTo() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |