Forum Moderators: open
I am currently viewing page 1. I want to go to a specific part of page 2 using my link to a named anchor. When I click on the link, it takes me to page 2, but not the right place on the page. The named anchor appears at the bottom of the page, instead of the top. If I refresh the page, or go back and do it again, then it works as it should. Anytime after the first attempt, it will go to the right place on the page. I have many pages that are like this, and they all do the same thing.
The catch is, it all works perfectly in Firefox and Opera but not with IE, so the problem is probably with IE. Does anyone have any idea why this is?
Thanks for your help!
Try these recent threads...
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]
[<h2 class="teams"><a name="giants">San Francisco Giants</a></h2>]
The weirdest thing is that it works fine on every click after the first, and there is only a problem with IE.
The weirdest thing is that it works fine on every click after the first, and there is only a problem with IE.
Once you have visited the page, it is then in the browsers cache and can be recalled quickly. And that seems to be the key.
Unfortunately I think the issue is related to the speed of connection, page size (KBs) and how 'fluid' the page is (are there many elements with a variable width/height? Like <p> text for instance?)
The browser needs to know/calculate the exact position on the page of the named anchor before it can jump to it. So, if there are lots of 'fluid' elements, these have to have already loaded. Unfortunately IE6 seems to timeout?! It hangs on for a few secs, but then seems to give up if the necessary page elements haven't loaded!? Either not going anywhere, or going to the wrong place!
A way to demonstrate this... under a 2mbps broadband connection the following link works for me everytime in IE6:
[w3.org...]
However, clear the cache and connect via dial-up (40Kbps) and it doesn't! The results are mixed, sometimes it gets 'close' (ie. a page too high), at other times it doesn't get anywhere! Once the page is in the cache, it usually works OK. (FF is OK)
For a page with a few 'heavy' images then it could be a lot worse.
So, for those using IE, it could work for some users and not others I guess. On some pages and not others.
Hhhmmm, if that's the case, I'm not sure how it can be fixed (in IE6)? Is it the same with IE7?
tedster- I gave it a shot, but it didn't change anything. Thanks for the idea though.
name on an anchor, you should really be using id instead. It's the recommended replacement for the deprecated <a name="foo"></a> you are currently using: <h2 class="teams" [b]id="giants"[/b]>San Francisco Giants</h2> I can't say whether it would have any effect on your particular bug, unfortunately.
I really think the problem is with the feeds I'm using. Since my page is getting information from other sites, it takes a while to get it all and put it in the right spot on the page. Then, when it goes down to try and find the right spot, it "loses focus" for lack of a better way of putting it and just gets close to the right spot. Then, after the info is loaded, it can find the right spot cause it doesn't have to worry about loading all the info. That's just my opinion, but does anyone have an idea how to fix that? Would I just have to do away w/ using feeds in order to fix the problem?