Louis, In this senario, I usually add a class to the set of elements I'm interested in getting back to later on by doing a Element.addClassName() and then doing a getElementsByClassName() later on. You can remove the 'dummy' class later if you need to: Element.removeClassName()
Hope this helps. Regards, Cam On 2/23/06, Louis Walch <[EMAIL PROTECTED]> wrote: > thanks rob, i will give input_.+ a shot. > > i use a custom attrib named fldtype for some input items and am hoping to > assign different actions to each input based on that. > > > > > > > > > > Louis Walch wrote: > >> i would like to detect classnames of input_(ANYTHING) is this possible > >> with getElementsByClassName? > > > > Looking at the source code you could do > > getELementsByClassName("input_.+");, although it's undocumented > > behaviour so it might mysteriously break after a prototype upgrade one > > day. I know the current method (of using a regexp) is one of the slowest > > ways of doing it. > > > >> > >> also, is tthere a way to get elements by attribute? or would that be too > >> heavy on the load time? > > > > That shouldn't be too intensive. See prototype.js's defnition for > > getElementsByClassName and hack your own. What attribute would this be > > useful for? Getting all text inputs? I would just getElementsByTagName > > and do a quick loop. > > > > -Rob > > > >> _______________________________________________ > >> Rails-spinoffs mailing list > >> Rails-spinoffs@lists.rubyonrails.org > >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > -- Cam McVey [EMAIL PROTECTED]
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs