[Javascript] Selecting a form element

Terry Riegel riegel at clearimageonline.com
Wed Oct 4 10:22:27 CDT 2006


> Is there any reason why you're not willing to give it an id?

No, that is what I have been doing. The problem is I have years worth  
of markup where I haven't given my form elements an ID, and everytime  
I work on some of my old markup I have to fiddle with it.


> Alternatively:
> function getInputByName(name)
> ...snip...

Thanks, it looks like a starting point. I probably should add other  
input types like textareas, etc. Once I get getElementsByTagName  
working (see my other post) I will try creating a more robust solution.

Terry




More information about the Javascript mailing list