[thelist] Need help, random connection problems, no pattern

jeff jeff at members.evolt.org
Fri Mar 30 15:36:47 CST 2001


ben,

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: Ben Dyer
:
: (You are using document.forms[0] instead
: of document.name_of_form right? :)
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

just curious what your reasoning for this is.

in my experience, accessing objects in the DOM via their index in a
collection is more problematic than via their name.  move things around in
the document (as is quite common in a dynamic site) and the indexes are
likely to change, but the names always stay the same.  maybe a more solid
solution would be to refer to them via their names, but within the
collection.  for example:

instead of like this:

document.name_of_form

you'd do it via the forms collection:

document.forms['name_of_form']

curious,

.jeff

name://jeff.howden
game://web.development
http://www.evolt.org/
mailto:jeff at members.evolt.org





More information about the thelist mailing list