Re: anchor question

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Quoted text here. Click to load it

the link references the same page

Re: anchor question

Quoted text here. Click to load it

The link references nothing (the anchor is undefined) within the same page.


Re: anchor question

Karl Groves wrote:

Quoted text here. Click to load it



We had quite a lively discussion about this a couple or three months ago.

As it turns out nobody really knows for sure what this means. There is
conflicting evidence.

What it *is* is an empty fragment identifier, a fragment identifier being
the bit after the # that one can optionally put at the end of a URL to refer
to a named anchor within the page. (note the URL bit may be missing so
"#namedanchor" is perfectly valid, as is "")

The HTML specification is totally vague about what happens with empty
fragment identifiers. In fact the spec does not even mention the
possibility. One has to delve into the RFCs.

The RFC under which HTML 4.1 supposedly operates (RFC1808) states that an
empty fragment identifier is actually invalid. It states that a fragment
identifier *must* have at least one character in it. Therefore an empty one
should be subject to browser error correction which is outside of any spec
and is at the whim of the browsers author.

There is a subsequent RFC which supercedes the above (RFC2396 IIRC) which
"corrects" the above by stating that a fragment identifier may in fact be
empty. However this RFC does not state what a UA must do with one. This RFC
is also only mentioned in the normative parts of the HTML spec IIRC. That
is, it is not "law".

One is left with what actually happens in real life:

Most of the current browsers interpret href="#" as being a link to the top
of the current document.

for the relevant archived threads on this topic.


Re: anchor question

Quoted text here. Click to load it

Here is the code I am using to set up some slideoutmenus.  I just don't know
what it means for the "a" tag.

  <script language="javascript" src="ypSlideOutMenusC.js"></script>
  <script language="javascript">
    new ypSlideOutMenu("menu1", "right", 120, 16, 150, 30)
    new ypSlideOutMenu("menu2", "right", 120, 35, 150, 30)


<a href="#" onmouseover="ypSlideOutMenu.showMenu('menu1')"
onmouseout="ypSlideOutMenu.hideMenu('menu1')">show menu 1</a><br>
<a href="#" onmouseover="ypSlideOutMenu.showMenu('menu2')"
onmouseout="ypSlideOutMenu.hideMenu('menu2')">show menu 2</a><br>

<div id="menu1Container"><div id="menu1Content" class="menu">this is menu
<div id="menu2Container"><div id="menu2Content" class="menu">this is menu




Quoted text here. Click to load it

Re: anchor question

( dropped a +5 bundle of words...

Quoted text here. Click to load it

<a href="#name">Where you want to go</a>
<a name="name"></a> (where you end up)

Starshine Moonbeam
mhm31x9 Smeeter#29 WSD#30

Site Timeline