lindm Posted July 30, 2008 Share Posted July 30, 2008 Reading different views on if both the id and name are necessary for a form element. What are your views? See http://bytes.com/forum/thread150126.html http://www.webmasterworld.com/forum21/6195.htm Quote Link to comment Share on other sites More sharing options...
rhodesa Posted July 30, 2008 Share Posted July 30, 2008 as far as i know, the NAME attribute specifies name of the element passed by the form. i sometimes use ID too if i want to access it with document.getElementById(), but most of the time i don't need that. using just ID doesn't allow for form element arrays (like name="chkbox[]")... Quote Link to comment Share on other sites More sharing options...
haku Posted July 31, 2008 Share Posted July 31, 2008 Id isn't necessary, though its often very useful. The name value however is necessary if you want to pass values (which, other than maybe the submit button, passing values is what forms do). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.