Paul
Paul

Reputation: 1004

Hyperlink Bookmarks Links not working in Firefox

I've got an un-complicated .aspx page and I've added some bookmark anchors at that re-direct to a different page with bookmarks.

The anchors look like this: From http://www.davincispainting.com/painting-solutions

<a class="questionLink" href="painting-answers#Answer7">Paint Chalking</a>

When you click on this Hyperlink in Firefox, the URL does indicate the bookmark: http://www.davincispainting.com/painting-answers#Answer7

However, this do not navigate to the actual bookmark in the 2nd page

<h2 id="answer7">Paint Chalking</h2>

The problem occurs in Firefox but not IE8.

I originally thought that the Routing was causing the issue, as I do not inlcude the .aspx page extension in the link. So I added the extension, which still doesn't work.

<a class="questionLink" href="painting-answers.aspx#Answer7">Paint Chalking</a>

How can I debug this problem?

Upvotes: 0

Views: 640

Answers (2)

Paul
Paul

Reputation: 1004

The problem was the name itself:

<h2 id="Answer7" style="font-size:1.5em; color:Green;">Paint Chalking</h2>

is different than:

<h2 id="answer7" style="font-size:1.5em; color:Green;">Paint Chalking</h2>

Upvotes: 0

mason
mason

Reputation: 32694

Does the page file end in an extension? If so, make sure your link includes the extension. Also, check your capitalization. Also, the standard practice for the bookmark syntax is to not navigate based on ID of a random control, but rather the anchor tag. See W3 Schools Example.

You should have...

<a id="answer7" />
<h2>Paint Chalking</h2>

and the link should look like this:

<a class="questionLink" href="PATHTOPAGE#answer7">Paint Chalking</a>

Where PATHTOPAGE is replaced with the absolute or relative path to the other page. Make sure that resolves.

Upvotes: 1

Related Questions