View Single Post
Old 01-10-2013, 09:32 PM   PM User | #4
surreal5335
Regular Coder

 
Join Date: May 2008
Posts: 446
Thanks: 23
Thanked 5 Times in 5 Posts
surreal5335 is an unknown quantity at this point
The point of .getAttribute() is to get the specified attribute of the html element in question. I looked it up and found that it gets the value of it already so I can drop the .value portion of it. I am used to defining .value for these kinds of things to get the value.

I am not trying to validate the value of the name attribute, I am trying validate the value of the input element. I have lots of input elements and I need to identify which input has been targeted, thats why I get the name attribute first.


// var input = document.getElementsByName(name).value;

currently its commented out, but I will be uncommenting it so as to get the value of the input field after targeting it with the getElementsByName(name). After this I would validate.
surreal5335 is offline   Reply With Quote