W3C home > Mailing lists > Public > www-html@w3.org > December 2001

RE: anchors

From: Hoyt, Phil <Phil.Hoyt@globeinteractive.com>
Date: Sun, 2 Dec 2001 18:20:41 -0500
Message-ID: <F61568F110EAD411BD350008C7860164091FE2B2@commercial.globeinteractive.com>
To: "'www-html@w3.org'" <www-html@w3.org>
That helps, but I think it's very clumsy. It breaks one of my unwritten
rules of good html: never use javascript to do something fundamental to the
use of the site. Also, writing the entire URL out just doesn't work in a
servlet-generated site where the URL could be just about anything. In short,
this problem is entirely preventing me from using base href.

I would like to be able to refer to an anchor in the document in question,
or one at the base href alternately depending on the syntax I use. Something
like "/#anchor" refers to the base href, while "#anchor" refers to the
current document. Or, perhaps more reverse-compatible, one could use 

-----Original Message-----
From: Vix [mailto:vixcc@yahoo.com] 
Sent: Sunday, December 02, 2001 6:13 PM
To: Hoyt, Phil; www-html@w3.org
Subject: Re: anchors


I think that the Spec is clear about that.
A BASE href is meant to be the basis for all HREFs without a BASE explicitly
declared in their
HREF section.

Thus, having the tag <a href="#top">, with a BASE
HREF="http://www.url.com/", this means that the
anchor must be appended to the BASE in this case. This ends up as:

So far was only meant to discuss the SPEC part.
Going back to being able to specify #anchors inside your document, there are
TWO ways that I know
of, even if you're using BASE hrefs.

1- Have the URL explicitly declared with the anchor. <a

2- Use a javascript function to fill in the Document.location at run-time if
you don't know the
file name or if you are afraid that the file name might be changed without
the HREF updated as

I hope the above helps.

Best regards,


------> tAke a bReak! gEt eNtertained!
------> http://www.sallini.com/
-> http://netdesignplus.net/
-> It works... It Pays...

Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
Received on Sunday, 2 December 2001 18:21:19 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:58 UTC