Randy Webb <Hi************@aol.com> writes:
Thomas 'PointedEars' Lahn said the following on 3/11/2006 5:18 PM: vikesfan wrote: document.forms[0].button.value = next;
document.forms[0].elements['button'].value = next;
There is nothing more "standards compliant" about what you posted than
what the OP posted. Both are equally "compliant".
No need to put "compliant" in quotes[1].
The specification is not entirely clear on this point. There is no
doubt that what Thomas Lahn wrote is only relying on features
standardized by the W3C HTML DOM (even in version 1) ECMAScript
bindings.
There is doubt that the named controls should be made available as
properties of the form element itself, and not just as properties of
the elements collection. Doing so is unnecessary (since the elements
collection is specified) and it is likely to lead to name collisions
between form controls and properties and methods of the form
element. It is, however, what most brosers have done, leading
to the recurring problem of "form.submit() doesn't work .. oh, the
submit button is named 'submit'".
/L
[1] Damn, now I did it!
--
Lasse Reichstein Nielsen -
lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'