[thelist] javascript and IDs

Christian Heilmann codepo8 at gmail.com
Tue Oct 4 11:46:23 CDT 2005


> > I want to change the value of an attribute of an input
> > field:
> > <input type="text" name="foo">
> > want to change it to
> > <input type="text" name="bar">
> Why not document.getElementByID('searchfield').name='bar'; ?
> Why do you want to change the name of a field on the fly anyway?

getElementById of course.

--
Chris Heilmann
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
Binaries: http://www.onlinetools.org/


More information about the thelist mailing list