Ive got it now and I wonder if this link works in every browser. Ive tried Mozilla 1.5a and IE 6.0 and it seems to work fine.
I realize that in the majority of cases, such links are not necessary or disturbing. But sometimes it is just nice to use a named anchor anyway.
Link to a named anchor in the same node
In a long node it might aid the reader to make chapters, or just refer to some specific part in the node.
| With links like these: |
Anchors like these can be included in the section where the link should point to: |
|
<a href=#anchorname>Text Text Text</a> <a href="#anchorname">Text Text Text</a> |
<a name=anchorname>Text text text</a> <a name="anchorname">Text text text</a> |
Link to a named anchor in another node
A lot of ways to link to a named anchor in another node do not work correctly, the link will be translated into a faulty URL. Some examples that do not work:
[nodename#anchorname|Text text text]
[id://954#anchorname|Text text text]
<a href="nodename#anchorname">Text text text</a>
<a href=nodename#anchorname>Text text text</a>
The solution of a link with a named anchor seems not to be possible with square brackets [
]. The only way seems to be to use the real HTML <a href=
> with the full path from the root.
These examples work fine:
<a href="/index.pl?node=954#regexdata">Regular Expressions</a>
<a href=/index.pl?node=954#regexdata>Regular Expressions</a>
Are there easier and/or more elegant ways to do this? Am I missing something?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Named anchors in current node or in another node
by castaway (Parson) on Aug 18, 2003 at 12:15 UTC | |
by tye (Sage) on Aug 18, 2003 at 15:31 UTC | |
|
Re: Named anchors in current node or in another node
by dbwiz (Curate) on Aug 18, 2003 at 12:33 UTC | |
|
Re: Named anchors in current node or in another node
by woolfy (Chaplain) on Aug 18, 2003 at 19:18 UTC |