As in, is there one in the core Prototype implementation? Since $
(name) should map to a single element in the document (because each
'id' attribute value should be unique since it is used by CSS),
shouldn't you be able to have the same kind of access for retrieving
multiple document elements with the same name, such as:

function $N(element) {
  var elements = new Array();
  if (arguments.length == 1) {
    elements = document.getElementsByName(element).collect(function(e)
{
      return Element.extend(e);
    });
  }
  return elements;
}

such that:

var removers = $N('removeIcons');

would return an array of extended elements whose HTML name attribute
is 'removeIcons'.

Inquiring minds...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" 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-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to