In comp.lang.javascript message <mba0j75b4c40f7lvccf8rvrb6ha71p7nds@4ax.
com>, Mon, 6 Feb 2012 11:29:59, Gene Wirchenko <
ge...@ocis.net> posted:
The problem in the past has been that maintainers have known JavaScript
too well, while being relatively poor at communicating to the sort of
people who are needing help.
An example from my own experience as a newcomer : I asked about writing
to a page which was already being displayed. In those days, one might
need to use document.layers or document.all or document.getElementById,
for the general case of "labelling" and writing to a general location.
The then maintainer offered a complex piece of code which generated a
browser-dependent function to get a reference when called by another
function F expressed by a string; he said to use <div ID=anID></div> in
the HTML and F("anID", S) in the script to write string S into that div.
It worked, of course; and went into the FAQ; it is now simplified into
Section 9.4.
But it did not say, and 9.4 does not explicitly say, that the solution
to the task has two distinct consecutive parts - getting a reference to
the element, and setting the value` of the element. It did not
explicitly say that the solution could be used for most types of
container element. It did not mention that such a reference could be
obtained in other ways such as forms[3] or this.form.Btn1.
The two parts, separated but joinable, are far more widely useful than
the united code.
Now see <
http://www.merlyn.demon.co.uk/js-faq-u.HTM#MaWP> ff.
--
(c) John Stockton, Surrey, UK. ?@
merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <
http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)