link to named anchor not working in same tab

RESOLVED INVALID

Status

SeaMonkey
General
RESOLVED INVALID
14 years ago
14 years ago

People

(Reporter: rsaymon, Unassigned)

Tracking

Trunk
x86
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616

When I click on any of the links on the left hand side of the page (for instance
"Additional Resources") the browser doesn't go to the link.  In this case the
link  is a named link to a location on the same page.  When I open this link in
another tab the new tab opens to the correct location on the page.  I checked
the behavior of this link in IE and it works fine.

Reproducible: Always
Steps to Reproduce:
1.  Go to the indicated web page.
2.  Press any of the links on the left hand side, for example "Additional Resources"
3.  

Actual Results:  
Nothing happens, the link doesn't work.

Expected Results:  
The browser should have displayed the portion of the page identified in the
anchor link.

I've noticed that these anchor links are nested inside other anchor links.  When
I removed these outside anchor links the anchor links worked properly and opened
corectly in the same tab.

Comment 1

14 years ago
This is the involved code in the page:

line 88:	<a href="#administration">[...]
line 89:					<table border="0" cellpadding="0" cellspacing="0" frame=""
width="100%">
[...]							<tr>
<td valign="top"><a href="#resources"><font size="2" face="Arial
Narrow,Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Additional
Resources</font></a></td> </tr> </table> 
line 115: </b></font></a>

Notice the <a> starting before the table and the closing </a> after the closing
of table. This is improper nesting: an inline element can not nest a block-level
element.

Also, 12.2.2 Nested links are illegal
"an A element must not contain any other A elements."
http://www.w3.org/TR/html401/struct/links.html#h-12.2.2

When the mouse hovers over the link, the statusbar reports:
http://www.aea267.k12.ia.us/cia/framework/thinking/#administration
while the link properties from right-click context-menu reports:
Address: http://www.aea267.k12.ia.us/cia/framework/thinking/#resources
So, the browser is [understandably] confused.

On top of that, there is no <a name="administration" ...> anywhere (or <a
id="administration" ...>) in the document. So that explains why nothing happens.

Mozilla 1.8a2 build 2004070707 under XP Pro SP1a here.

The W3C HTML validator spots these markup errors along with some 30 other errors:
Line 89, column 77: document type does not allow element "TABLE" here;
(link broken to avoid scrolling)
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.aea267.k12.ia.us%2Fcia%2Fframework
%2Fthinking%2F&charset=%28detect+automatically%29&doctype=%28detect+automatically%29&
ss=1&outline=1&No200=1

Resolving as INVALID
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → INVALID
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.