On Wed, Feb 18, 2009 at 2:54 PM, Robert Walker
<[email protected]> wrote:

> To add a couple of point to this: First the name attribute is deprecated
> because it turned out to be a mistake. It server the exact same purpose
> as id and it redundant.

Actually not redundant in forms -- e.g. radio button elements can
be grouped by a shared name /and/ have unique IDs -- but...

> So given that there is not three identifiers there is just one, which is
> id. The class attribute does not identify a DOM element.

No, it doesn't identify a *unique* DOM element, but ...

> Notice that all id attributes are unique on the page and are used to
> identify DOM elements. CSS class names describe the styling and are not
> used to identify the DOM elements.

..e.g., you mentioned Prototype, which provides a convenient
 getElementsByClassName() method which identifies a *set* of
DOM elements. :-)

-- 
Hassan Schroeder ------------------------ [email protected]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to