> > 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/