[Javascript] javascript and id's

Anthony Ettinger apwebdesign at yahoo.com
Wed Oct 5 09:57:22 CDT 2005


--- David Hucklesby <davidh126 at writeme.com> wrote:

> Anthony Ettinger wrote:
> 
> > Or should I give each form element it's own id...
> 
> One other consideration that makes getElementById
> the easy way to access
> form elements is the use of the LABEL element.
> Adding a unique id to each
> form element and targetting it with a FOR attribute
> in the LABEL makes the
> form elements easier to access - you can click the
> LABEL's text to give the
> INPUT focus and to set a radio button or checkbox.

<label for="foo">Foo:</label> <input type="text"
id="foo" name="foo"/>


You're suggesting this I assume?



Anthony Ettinger
ph: (408) 656-2473
blog: http://www.chovy.com


		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com



More information about the Javascript mailing list