[thelist] Automatically scroll down to anchor

Christian Heilmann lists at onlinetools.org
Wed Feb 2 18:32:44 CST 2005

bernardo escalona wrote:

> Hello web gurus,
> Can someone show me by example how to force a page to scroll down to a 
> specific part of the page (anchor) as soon as the page is loaded?
> Im inserting a short javascript like this:
> window.location="#foo"
> but its not working quite right.
> Will appreciate any pointers.

You need to use location.hash:

More information about the thelist mailing list