remembering div position

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


I have a left div where there the menu is, and it is quite long, longer
than the web page, so it has a scroll bar.
My question is, is there a way to remember the div position once
clicked in one link below the screen and the page has been recharged?
I would like to avoid the users to scroll that div over and over and
should be nice if it presents the same position it had before clicked.

Thanks a lot,


Re: remembering div position wrote:

Quoted text here. Click to load it

Yes, but it's tricky and involves JavaScript.

Only URLs (bookmarks etc.) are "memorable" (I'm ignoring <form>s for
the moment)  Position of user controls isn't memorable.

Your solution is to use JavaScript hooked to the scrolling events of
the <div> to then create  a modified URL. Don't take too long doing it,
and don't do it too often, or else it will be unresponsive. Shortly
after scrolling has finished is fine.

Look at google maps for an example, although their "scrolling" is more
complex and they require a manual action to generate the bookmark.

Site Timeline