D
Dr J R Stockton
I see remarkably little use of structure-manipulating DOM methods in the
FAQ, even in Section "8 DOM and Forms". There is a firstChild, and I
did not see anything else.
8.1
When is the shorter var contrl = frm.elementname not OK, except
as in 8.2? Surely one should name all items to match /^\w+$/, where
possible, perhaps also allowing judicious $.
ISTM that the value of a form control is predominantly needed in
functions called by elements within the form; and in that case it can
appropriately be obtained by giving this.form as an argument - minimal
demo :
<script> function Fn(F) { alert(F.A.value) } </script>
<form><input name=A><input type=button onClick="Fn(this.form)"></form>
8.2
The word "illegal" should be used only in respect of breaches of the Law
(users can get perturbed by messages such as "illegal operation
invoked"). Consider
Form controls can be accessed with formref.elements["FormName"]. The
bracket characters, amongst others, are _not allowed_ in ID attributes
and javascript identifiers; avoid them, as browsers may handle them
incorrectly.
Much of Section 8 does not seem to fit the title "DOM and Forms" - and
from that title it is not clear whether the intent is "about DOM and
about Forms" or "About (DOM with Forms)".
Section 9.3 is too long. There should be no space in "et c" - should be
"etc."
Section 9.16 How do I open a new window with javascript?
Perhaps should be "Window or Tab".
Could add "How to replace the entire content of the present window?"
see my js-misc1.htm, Bar Codes, table, note for 'OK 2'.
There is no mention of "Tab" in the FAQ, in the sense of 'sub-window'
rather than 'to tab-stop', except for Fiddler.
Here's a DOM question that I currently want the answer to, that *might*
serve for a FAQ DOM example : After multiple appendChild, how do I
remove all of them?
There seems to be no removeChildren provided. One can presumably get
and remove firstChild or lastChild until there are none left; or
likewise make them grandchildren of one parent and later remove her.
---
If Bart cannot sequentially post ALL FAQ sections, then his regular
postings should stop. They distract our attention from the rest of the
FAQ.
And if the entire FAQ is not regularly posted to the group, in one to
many parts, then it cannot be considered a collective work.
FAQ, even in Section "8 DOM and Forms". There is a firstChild, and I
did not see anything else.
8.1
When is the shorter var contrl = frm.elementname not OK, except
as in 8.2? Surely one should name all items to match /^\w+$/, where
possible, perhaps also allowing judicious $.
ISTM that the value of a form control is predominantly needed in
functions called by elements within the form; and in that case it can
appropriately be obtained by giving this.form as an argument - minimal
demo :
<script> function Fn(F) { alert(F.A.value) } </script>
<form><input name=A><input type=button onClick="Fn(this.form)"></form>
8.2
The word "illegal" should be used only in respect of breaches of the Law
(users can get perturbed by messages such as "illegal operation
invoked"). Consider
Form controls can be accessed with formref.elements["FormName"]. The
bracket characters, amongst others, are _not allowed_ in ID attributes
and javascript identifiers; avoid them, as browsers may handle them
incorrectly.
Much of Section 8 does not seem to fit the title "DOM and Forms" - and
from that title it is not clear whether the intent is "about DOM and
about Forms" or "About (DOM with Forms)".
Section 9.3 is too long. There should be no space in "et c" - should be
"etc."
Section 9.16 How do I open a new window with javascript?
Perhaps should be "Window or Tab".
Could add "How to replace the entire content of the present window?"
see my js-misc1.htm, Bar Codes, table, note for 'OK 2'.
There is no mention of "Tab" in the FAQ, in the sense of 'sub-window'
rather than 'to tab-stop', except for Fiddler.
Here's a DOM question that I currently want the answer to, that *might*
serve for a FAQ DOM example : After multiple appendChild, how do I
remove all of them?
There seems to be no removeChildren provided. One can presumably get
and remove firstChild or lastChild until there are none left; or
likewise make them grandchildren of one parent and later remove her.
---
If Bart cannot sequentially post ALL FAQ sections, then his regular
postings should stop. They distract our attention from the rest of the
FAQ.
And if the entire FAQ is not regularly posted to the group, in one to
many parts, then it cannot be considered a collective work.