[Javascript] Selecting a form element

Peter Brunone peter at brunone.com
Wed Oct 4 13:14:45 CDT 2006



   That's probably because "mydata" is the element's name attribute.  The tag name is "INPUT".

Cheers,

Peter

				From: Terry Riegel riegel at clearimageonline.com

> Terry Riegel wrote:
>> If I have a form element like
>> 
>> Is there a way to select it in a similar manner to getElemntById()?
>
> var nameArray = document.getElementsByTagName('mydata');

I can' seem to get getElementsByTagName working. I am not sure what I 
am doing wrong. You can see my failing example at.

http://clearimageonline.com/projects/prototype.js/inputfinder.html

as an aside: I am also slowly learning to code unobtrusive 
javascript. Thanks to Paul and others for helping me see the light.

Terry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20061004/a6786b2b/attachment.htm>


More information about the Javascript mailing list