[Javascript] javascript and id's
Anthony Ettinger
apwebdesign at yahoo.com
Tue Oct 4 12:22:09 CDT 2005
Well, from what I've talked with some co-workers, they
are saying 'id' should be used instead of 'name'.
Although I'm sure they will always be backwards
compatible. The problem I raised was what do you do in
a radio group? where id would/should be the name (but
id implies only one per page).
I don't know who is right/wrong. But the latest
javascript I've seen all seems to revolve around
getElementById.
--- Peter Brunone <peter at brunone.com> wrote:
> Based on what source?
>
> Is the name attribute becoming obsolete? I find it
> hard to believe they'd change the form object model
> like that, but stranger things have happened...
>
> From: Anthony Ettinger apwebdesign at yahoo.com
>
> Yes, you can. But it's my understanding that method
> is
> quickly becoming obsolete, infavor of
>
> var object = document.getElementById('foo');
>
> --- Flavio Gomes wrote:
> >
> > Having a form named* "myForm" and an input named
> > "myInput":
> > You can access it by "document.myForm.myInput" in
> > the majority of the
> > browsers.
> > _____________________________________
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