Gossamer Forum
Home : General : Internet Technologies :

Page positioning within a window...

Quote Reply
Page positioning within a window...
What's the simplest way to maintain the vertical page position in existing browser window when opening a new browser window?

Example: I have a long "results" page and at various points down the page I have links that open new browser windows. The problem is, that when one clicks on one of these links to open the other browser window, the "results" page in the first window automatically jumps back up to the top of the page. This gets annoying when one has to keep paging back down to where they last were on the "results" page after closing the new browser window.
Quote Reply
Re: [jharwood] Page positioning within a window... In reply to
I am not quite sure what you are doing, but you could try using bookmark codes (i.e., #something) in your link.


<a href="something.cgi?linkid=313#313">

then add a hidden image with

<a name="313">

of course changing 313 to a dynamic vartiable associated with the link.
Buh Bye!

Quote Reply
Re: [Stealth] Page positioning within a window... In reply to
The following may be painfully obvious to most of you, but it wasn't to me...(I'm REALLY new to this!)

this was the original code for each link down the page:

href = "#"

and this is how I changed it to meet my needs:

href = "javascript:void(0)".

Apparently the "#" means to reload the window with the same page, thus moving the scroll position back to the top (of course).

The the "javascript:void(0)" simply means to 'do nothing', thus leaving the page in it's original scroll position (not having done anything!).