Hi All, Sorry if this is the wrong group, but where can I find API info on the find() method in prototype.js? I tried searching, but it keeps getting filtered to ''find'' with a ton of junk. thanks. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
EDIT: here''s the only working example I have been able to find, but still can''t figure it out, I need an array of found elements: Form.getInputs(''myform'',''radio'',''type'').find(function(radio) { return radio.checked; }).value; On Nov 19, 5:54 pm, James Kewageshig <james.kewages...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi All, > > Sorry if this is the wrong group, but where can I find API info on the > find() method in prototype.js? > > I tried searching, but it keeps getting filtered to ''find'' with a ton > of junk. > > thanks.--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Here you go: <http://prototypejs.org/api/enumerable/find> A really simple example would be: [1, 2, 3].find(function(item) { return item == 2; }); // returns 2 :) On 19/11/2007, James Kewageshig <james.kewageshig-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > EDIT: here''s the only working example I have been able to find, but > still can''t figure it out, I need an array of found elements: > > Form.getInputs(''myform'',''radio'',''type'').find(function(radio) { return > radio.checked; }).value; > > > On Nov 19, 5:54 pm, James Kewageshig <james.kewages...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > Hi All, > > > > Sorry if this is the wrong group, but where can I find API info on the > > find() method in prototype.js? > > > > I tried searching, but it keeps getting filtered to ''find'' with a ton > > of junk. > > > > thanks. > > >-- burnfield.com/martin --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
d''ohh Enumerable, of course, thx! On Nov 19, 6:04 pm, "Martin Ström" <martinstromli...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Here you go: > <http://prototypejs.org/api/enumerable/find> > > A really simple example would be: > > [1, 2, 3].find(function(item) { > return item == 2; > > }); > > // returns 2 :) > > On 19/11/2007, James Kewageshig <james.kewages...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > EDIT: here''s the only working example I have been able tofind, but > > still can''t figure it out, I need an array of found elements: > > > Form.getInputs(''myform'',''radio'',''type'').find(function(radio) { return > > radio.checked; }).value; > > > On Nov 19, 5:54 pm, James Kewageshig <james.kewages...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > > > Hi All, > > > > Sorry if this is the wrong group, but where can IfindAPI info on the > > >find() method inprototype.js? > > > > I tried searching, but it keeps getting filtered to ''find'' with a ton > > > of junk. > > > > thanks. > > -- > burnfield.com/martin--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---