I''ve googled a bit, but haven''t come up with anything. It seems the Builder.node chokes on the for attribute when building label tags. Probably because of the keyword for when looping through the arguments. Is this a known problem? I wrote my own patch that seems to solve it (substituting labelFor instead of for) but an official solution would be nice. Andreas
If you''re assigning it via javascript, it should be htmlFor (label.htmlFor = ''id''). Not sure how builder.node works, but there might need to be a special case added for that one. Greg> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org[mailto:rails-spinoffs-> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Andreas Wahlin > Sent: Tuesday, July 25, 2006 1:38 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails-spinoffs] Builder.node label for attribute > > I''ve googled a bit, but haven''t come up with anything. It seems the > Builder.node chokes on the for attribute when building label tags. > Probably because of the keyword for when looping through thearguments.> Is this a known problem? I wrote my own patch that seems to solve it > (substituting labelFor instead of for) but an official solution would > be nice. > > Andreas > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
you had a problem with var label = Builder.node(''label'', { for: ''id_of_an_input'' }); ? try: var label = Builder.node(''label'', { ''for'': ''id_of_an_input'' }); hth On 7/25/06, Andreas Wahlin <andreaswahlin-cgr7CL/LOSDk1uMJSBkQmQ@public.gmane.org> wrote:> > I''ve googled a bit, but haven''t come up with anything. It seems the > Builder.node chokes on the for attribute when building label tags. > Probably because of the keyword for when looping through the arguments. > Is this a known problem? I wrote my own patch that seems to solve it > (substituting labelFor instead of for) but an official solution would > be nice. > > Andreas > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- Mit freundlichen Grüßen Siegfried Puchbauer _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs