View Full Version : View auto-scrolls to top with Open Browser Window

Bill Pitts
02-02-2010, 03:59 PM
I've a page with a null link for a word (stratigraphy) that I thought best be defined for the general reader. Using the Open Browser Window behavior does the trick nicely, but when the new window opens, the underlying page automatically scrolls to the top in Safari v4.0.4, Firefox v3.5.7, and SeaMonkey v2.0.2. on my Macintosh. Interestingly enough, the page view stays where the link is on IE v5.2.3. (I haven't had the opportunity to check it anywhere else yet.)

The page in question can be found here (http://www.newsouthernview.com/pages/nsv_shm_jaketown_site.html). This link, stratigraphy, is in the the third paragraph.

Does anyone have a solution for keeping the page stationary?

And on a minor point, more a matter of curiosity than anything else, opening this new browser window in Safari, Firefox, and SeaMonkey adds a pound sign (#) after the URL. This doesn't happen in Internet Explore. Could there be a connection, as I use the # symbol to establish my null link?

I've included the partial sentence with the code below.

The <a href="#" onclick="MM_openBrWindow('nsv_shm_jaketown_def_strat.html', '','width=700,height=350')">stratigraphy</a> of the site is also being examined . . .

Any help would be greatly appreciated.


02-02-2010, 07:16 PM
href="#" is not a link, so you cannot put that in there.

You need to insert the real link in there (for those without javascript), and then cancel the link for those with javascript on (return(false)):
<a href="nsv_shm_jaketown_def_str at.html" onclick="MM_openBrWindow('nsv_shm_jaketown_def_str at.html','','width=700,height=350'); return(false);">stratigraphy</a>

Bill Pitts
02-03-2010, 04:29 AM
You were right! I swapped href="#" with href="javascript:;" and now the page stays put. Thanks!

02-03-2010, 01:24 PM
Well, not exactly what I said, but if it works for you that's great 8)