using F$(''checkboxID'') to get the checked values, always returns "null" unless it is the last checkbox or first (I dunno if it processes from the bottom or top) but I''ve tried a lot of different ways of getting the checkbox value but nothing seems to work. Is this a bug or am I doing something wrong???? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
hi, seems you have a typo here: F$ shall be $F Taking it as $F ...alert ($F(''checkboxID'')); should tell you the checkbox.value .. hf\ Bastian On 8/10/07, mklebel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <mklebel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > using F$(''checkboxID'') to get the checked values, always returns > "null" unless it is the last checkbox or first (I dunno if it > processes from the bottom or top) but I''ve tried a lot of different > ways of getting the checkbox value but nothing seems to work. Is this > a bug or am I doing something wrong???? > > > > >-- -- spread the word ... see www.browsehappy.com ;o) Calvin: Weekends don''t count unless you spend them doing something completely pointless. Join the Greater IBM Connection ( http://www.xing.com/premiumgroup-6291.d26b7d) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
sorry for the typo, there isn''t one in my code, only in that post there was. When I use alert($F(''checkboxID'')); for the onclick on each checkbox, I get null for everything except the very first checkbox... very weird. On Aug 11, 10:31 am, "Bastian Feder" <bastian.fe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> hi, > seems you have a typo here: F$ shall be $F > > Taking it as $F ...alert ($F(''checkboxID'')); should tell you the > checkbox.value .. > > hf\ > Bastian > > On 8/10/07, mkle...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <mkle...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > using F$(''checkboxID'') to get the checked values, always returns > > "null" unless it is the last checkbox or first (I dunno if it > > processes from the bottom or top) but I''ve tried a lot of different > > ways of getting the checkbox value but nothing seems to work. Is this > > a bug or am I doing something wrong???? > > -- > -- > spread the word ... seewww.browsehappy.com;o) > > Calvin: Weekends don''t count unless you spend them doing something > completely pointless. > > Join the Greater IBM Connection (http://www.xing.com/premiumgroup-6291.d26b7d)--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi, it took a while until I realized the $F() only includes elements with a unique ID. But checkbox- and radio- groups depend on the same name on the elements in a group. So the solution why you are only get the value of the 1st checkbox returned ... everytime !!!! To do what you want you need to iterate throught the group on your own.. like this: <--- script snip -----> function c(aaa) { var sel = $A(document.getElementsByName(''zutat'')).findAll(function(s) { return $(s).checked; }); sel.each(function(s){alert(s.value);}); } <--- script snip -----> <---- HTML snip ---> <form id="abc" > <input type="checkbox" id="zutat1" name="zutat" value="salami"/> Salami<br/> <input type="checkbox" id="zutat2" name="zutat" value="pilze"/> Pilze<br/> <input type="checkbox" id="zutat3" name="zutat" value="sardellen"/> Sardellen<br/> <input type="button" onclick="c(this);" value="click me" /> </form> <---- HTML snip ---> Hope I got you right ;o) Bastian On 8/13/07, mklebel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <mklebel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > sorry for the typo, there isn''t one in my code, only in that post > there was. When I use alert($F(''checkboxID'')); for the onclick on each > checkbox, I get null for everything except the very first checkbox... > very weird. > > On Aug 11, 10:31 am, "Bastian Feder" <bastian.fe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > hi, > > seems you have a typo here: F$ shall be $F > > > > Taking it as $F ...alert ($F(''checkboxID'')); should tell you the > > checkbox.value .. > > > > hf\ > > Bastian > > > > On 8/10/07, mkle...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <mkle...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > using F$(''checkboxID'') to get the checked values, always returns > > > "null" unless it is the last checkbox or first (I dunno if it > > > processes from the bottom or top) but I''ve tried a lot of different > > > ways of getting the checkbox value but nothing seems to work. Is this > > > a bug or am I doing something wrong???? > > > > -- > > -- > > spread the word ... seewww.browsehappy.com;o) > > > > Calvin: Weekends don''t count unless you spend them doing something > > completely pointless. > > > > Join the Greater IBM Connection ( > http://www.xing.com/premiumgroup-6291.d26b7d) > > > > >-- -- spread the word ... see www.browsehappy.com ;o) Calvin: Weekends don''t count unless you spend them doing something completely pointless. Join the Greater IBM Connection ( http://www.xing.com/premiumgroup-6291.d26b7d) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---