I’ve run into an issue and am not having success finding anything on the web. Hopefully someone can help me out.
We have a bunch of pages where a link pops a new window and the target url has a specific anchor defined (xxx.html#whatever).
The misbehavior we are seeing is that for about 60% of these the page loads, and then scrolls to almost the right spot on the page but overshoots it. Sometimes by more than a screen.
This behavior is seen in both IE5.5, NS4.7x, and NS6.2.3 (all in windows).
If you take the full target URL and then paste it into a new window, the page loads and scrolls fine. If you have the target URL load in the same window rather than a new window, the page scrolls fine.
This is a JSP environment and javascript is used to define the links and pop the windows.
Anybody have any ideas?
Not any that are publicly accessible, unfortunately.
I noticed something similar to this on one of my sites recently.
Does the page you’re opening have a lot of images? If you don’t have image heights and widths, then there’s no placeholder for these images. So while your page does open up to the right place, for a second, the “right place” suddenly moves away as images load and push the anchor up or down.
If you open it in a new window I suspect the new window is a lot larger than the popup you’re targeting, and also the images are probably in cache by then, so you’ve got more room for graphics (less places for the text to scroll to) and faster-loading images.
Sorry if that doesn’t make sense, but it’s something I noticed on one of my pages. Adding heights and widths to all my images then made it stop doing that and load correctly.
That was a good thought and I just checked it out. But several of the involved pages have no significant graphics. Thanks though!