Re: document.forms[formName].elemName
VK wrote:
Why not read a posting again before protesting, if it is confusing at first?
No, the proprietary backwards-compatible "convenienc e shortcut" regarding
the reference to form control objects that we are talking about here is
document.formna me.elementname
or
document.forms["formname"].elementname
instead of the standards-compliant and also backwards-compatible
document.forms["formname"].elements["elementnam e"]
Whether the bracket property accessor is used or not is secondary to this
difference.
You miss the point.
PointedEars
--
var bugRiddenCrashP ronePieceOfJunk = (
navigator.userA gent.indexOf('M SIE 5') != -1
&& navigator.userA gent.indexOf('M ac') != -1
) // Plone, register_functi on.js:16
VK wrote:
On May 25, 7:01 pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
wrote:
>
???
wrote:
>The reason for using the standards-compliant approach over the proprietary
>one is that the latter is the *proprietary* one.
>one is that the latter is the *proprietary* one.
???
forms[index] or forms["formName"] exposes an object with properties
representing form elements (a.k.a. controls) in the given form.
Javascript allows to access object property over squared brackets
notation or over dot notation, other words in object foo with property
bar, the bar value can be accessed either
foo["bar"]
or
foo.bar
The latter form is a convenience shortcut of the first one
representing form elements (a.k.a. controls) in the given form.
Javascript allows to access object property over squared brackets
notation or over dot notation, other words in object foo with property
bar, the bar value can be accessed either
foo["bar"]
or
foo.bar
The latter form is a convenience shortcut of the first one
the reference to form control objects that we are talking about here is
document.formna me.elementname
or
document.forms["formname"].elementname
instead of the standards-compliant and also backwards-compatible
document.forms["formname"].elements["elementnam e"]
Whether the bracket property accessor is used or not is secondary to this
difference.
[...]
These are basics of the language itself,
These are basics of the language itself,
PointedEars
--
var bugRiddenCrashP ronePieceOfJunk = (
navigator.userA gent.indexOf('M SIE 5') != -1
&& navigator.userA gent.indexOf('M ac') != -1
) // Plone, register_functi on.js:16
Comment