Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #14888
| From | Dr J R Stockton <reply1227@merlyn.demon.co.uk.not.invalid> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | An aid for text site developers |
| Date | 2012-07-05 18:44 +0100 |
| Organization | Home |
| Message-ID | <oc3lOnMQKd9PFw7R@invalid.uk.co.demon.merlyn.invalid> (permalink) |
This is a simple piece of code which many of you could have written and
tested in five minutes. But you may not all have thought of doing so.
In the common include file, or in an include file present on the editing
system but not on the public server :-
function Hooks() { var DAJ, T, J = document.anchors.length
while (J--) { DAJ = document.anchors[J] ;
if (T=DAJ.name) DAJ.title = "#" + T } }
In each texty linky anchory page :
<BODY onload="Hooks()">
or <BODY onload="if (Hooks) Hooks()">
Now, if you think while reading page A and editing page B : "I should
link from somewhere in page A to the heading anchor there in page B -
what is it called?", just hover over the heading in B. Comment?
The 'if' part is perhaps not needed; and, with little more effort, one
could show IDs similarly.
--
(c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05.
Website <http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc. : <http://www.merlyn.demon.co.uk/programs/> - see in 00index.htm
Dates - miscdate.htm estrdate.htm js-dates.htm pas-time.htm critdate.htm etc.
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
An aid for text site developers Dr J R Stockton <reply1227@merlyn.demon.co.uk.not.invalid> - 2012-07-05 18:44 +0100
Re: An aid for text site developers "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-07-06 07:20 +0000
Re: An aid for text site developers Gene Wirchenko <genew@ocis.net> - 2012-07-06 10:38 -0700
Re: An aid for text site developers Tim Streater <timstreater@greenbee.net> - 2012-07-06 18:44 +0100
Re: An aid for text site developers Gene Wirchenko <genew@ocis.net> - 2012-07-06 13:26 -0700
Re: An aid for text site developers Tim Streater <timstreater@greenbee.net> - 2012-07-06 22:33 +0100
Re: An aid for text site developers Gene Wirchenko <genew@ocis.net> - 2012-07-07 21:25 -0700
Re: An aid for text site developers "Qu0ll" <Qu0llSixFour@gmail.com> - 2012-07-08 14:43 +1000
Re: An aid for text site developers Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-07-08 20:03 +0200
Re: An aid for text site developers John G Harris <john@nospam.demon.co.uk> - 2012-07-09 09:56 +0100
csiph-web