From: Garrett Smith on
nick wrote:
> On Apr 7, 7:00 pm, "FAQ server" <javascr...(a)dotinternet.be> wrote:
>> -----------------------------------------------------------------------
>> FAQ Topic - How do I get thevalueof aformcontrol?
>> -----------------------------------------------------------------------
>>

The question appears to be asking aformcontrol for instructions on how
to get thevalueof.

>> In HTML documents, aformmay be referred to as a property of the
>> ` document.forms ` collection, either by its ordinal index or by name
>> (if the `form` has a name). A `form`'s controls may be similarly referenced
>> from its ` elements ` collection:
>>
>> var frm = document.forms[0];
>> var contrl = frm.elements["elementname"];
> ^^^^^^
>
> "control" (with an 'o') is used instead for the rest of the example,
> except for one other case where "contrl" appears.
>
> Suggest replacing all with either "control" or "ctrl."
Thanks. Got that as "control" now.

The entry does not mention IE's mishandling of HTML 4.

"Note that where the value attribute is set, it determines the control's
initial value, otherwise it's the element's contents."
--
Garrett
comp.lang.javascript FAQ: http://jibbering.com/faq/