Welcome to WebmasterWorld Guest from 54.160.131.144

Forum Moderators: incrediBILL

Message Too Old, No Replies

Link to 'Named Anchor' doesn't work in IE

...but it does in FF

     

Storyman

6:56 pm on Dec 8, 2004 (gmt 0)

10+ Year Member



At the top of the page there is an anchor "top" and scattered throughout the body are graphic links that are suppose to take the user to the "top" anchor.

It doesn't work in IE, but does in FF. A search for the solution hasn't been helpful.

How can it be fixed--or can it?

<body>
<a name="top" id="top"></a>

............................

<a href="#top"><img src="images/top_arrow.gif" width="19" height="19" border="0" /></a>

rocknbil

7:07 pm on Dec 8, 2004 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Did you try making the name and ID different values, instead of them both being "top"?

encyclo

7:18 pm on Dec 8, 2004 (gmt 0)

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I've come accross this problem before but was never able to sufficiently pin it down, as it was sporadic (and I didn't have the time to do exhaustive testing).

The quick and easy way to fix this when you want to go to the top of page is to link simply to "#" and remove the top anchor completely: this should work cross-browser.

Storyman

8:16 pm on Dec 8, 2004 (gmt 0)

10+ Year Member



rocknbil,

It isn't clear to me why you advise changing the anchor from "top" to something else. This a component to an input page. The way it is structured there are 20 input boxes. Each input box has an anchor (which is structured the same way as the "top" anchor). Along the left side there is a list of twenty links with each associated to a different input box.

All twenty of those links work. What throws me is that for some reason the one link to the top of the page (which is scattered throughout the page) does not work like the others. Go figure.

encyclo,

Your solution worked. Here is my revised version:

<body>
// This line deleted...<a name="top" id="top"></a>

............................
// #top changed to #
<a href="#"><img src="images/top_arrow.gif" width="19" height="19" border="0" /></a>

As I mentioned to rocknbil, there are twenty other anchor links on the page that do work.

If anyone has any clue as to why this repeated anchor link does not work like the others (that do work) please comment.

Storyman

9:31 pm on Dec 8, 2004 (gmt 0)

10+ Year Member



Another twist to the problem.

As mention in a previous post there are twenty anchor links list in the navigation page. All of them are generated using PHP (#sec[$i]).

On one page there were only three anchor links in the navigation page (not including the link to the top of the page.) When they are hard coded as in: #reviews - #comments - #emails, they did not work in IE. However, when converted to the PHP system of (#sec[$i]) they do.

Nothing changes except for the name and id of the anchor links and in one case it will work in IE and in the other it won't. Both do work in FF however.

Obviously, there is an IE quirk at work here and if anyone has a clue to why it would make a difference to generate the links dynamically would mean success, please clue me in.

rocknbil

12:52 am on Dec 9, 2004 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I didn't advise it. I asked you if you had TRIED it.

Sometime set up a series of mouseover images and name one of the image objects "search", as in img name="search". Your mouseovers on that ONE OBJECT won't work until you change it to srch or searcha or something else. I never found out why, but it's something to know.

The name "top" is used to reference a browser window object and may very well be interferring with your links.

It certainly wouldn't hurt to try. I use "theTop".

 

Featured Threads

Hot Threads This Week

Hot Threads This Month