[thelist] javascript testing for a blank entry in a form

Joshua Olson joshua at waetech.com
Tue Jul 8 11:01:35 CDT 2003


----- Original Message ----- 
From: "Joshua Olson" <joshua at waetech.com>
Sent: Tuesday, July 08, 2003 11:40 AM


> The form element has a name attribute.  So instead of using the form
element
> called "name" it is referencing the attribute.  It is good practice to use
> the elements collection when referring to elements.  Example:

After rereading my post I see that I was confusing.

Forms have attributes (defined within the form tag) and elements (inputs
within the form).

When you reference form.name it is using the form's name attribute instead
of the text field named "name"

Explicitely selected the form.attributes or form.elements sets removes the
confusion.

Example:

form.attributes.name references the "name" attribute of the form tag.

form.elements.name references the text field named "name" within the form.

HTH,

<tip type="MS Word" author="Joshua Olson">
If working on an outline in MS Word it may be helpful to disable the
automatic formatting of ordered lists.  Once the outline is completely
filled in, reenable the autoformatting and then format the lists.
</tip>

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com
706.210.0168



More information about the thelist mailing list