i made a function which was a near duplicate of getElementsByClassName and saved it as getInputsByAttribute and saved it in an external js file.
but now i am getting "getInputsByAttribute can not be found" is there something i need to do to make it part of prototype? > > > 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