[thelist] form id instead of name?

Mark Kennedy mark at eurogamer.net
Wed Sep 5 10:39:17 CDT 2001

Hi, maybe a final thought, but from the xhtml compatibility guide on w3.org:

"Finally, note that XHTML 1.0 has deprecated the name attribute of the a,
applet, form, frame, iframe, img, and map elements, and it will be removed from
XHTML in subsequent versions"

Doesn't say anything about form element 'name's being deprecated, so... I think
you're ok to use them.

In this case,

theForm.elements[ "elemenentname" ]

is how I'd normally reference a form element given a form object
'theForm'.  The elements collection will let you index an element by name OR id,

Hope this help


P.S.  sorry if this material has already been covered; I'm new to the list ;)


Mark Kennedy

On Wed, 5 Sep 2001, rudy wrote:

>>And that, is pretty nifty!
>wow, thanks for the indepth analysis joe
>(are you sure you have a day job?)
>i am, in my usual inimitable fashion, going to opt for the simple solution
>  <form  name="theform" ...
>yes, this is not valid in xhtml strict
>i have a link at the bottom of each of my pages that sends the page to the
>w3 validator
>this error will stick out, should anybody even bother to run my form page
>through the validator
>even more unlikely, should that someone then contact me with a message such
>as "by the way, dude, you have an error on your form page" i shall take
>great delight in pointing them to this thread in our archives
>again, thanks for the digging, joe
>For unsubscribe and other options, including
>the Tip Harvester and archive of TheList go to:
>http://lists.evolt.org Workers of the Web, evolt ! 


More information about the thelist mailing list