|
-
April 20th, 2007, 10:12 AM
#2
Re: getElementById and Array
the function name is ById, and you're only setting the name attribute. It doesn't work that way.
An ID has to be wholly unique in a document. It's the unique identifier. You can have multiple elements share the same name, though, and you can use getElementsByName instead, though I'm not sure what the support level is for that function; I know getElementById is pretty much universal. An alternative solution is to give those elements a class name and use an implementation (note: not a standard method) getElementsByClassName.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|