This works. Thanks.
On Jun 13, 1:44 pm, kangax <[EMAIL PROTECTED]> wrote:
> Wrap attribute value in quotes.
> Also, it's a good idea to define variables local:
>
> var prop = 'fields[title]';
> $('foo').down('[name="'+ prop +'"]');
>
> - kangax
>
> On Jun 13, 1:13 pm, louis w <[EMAIL PROTECTED]> wrote:
>
> > Having problems using the down function to find inputs which have been
> > named as an array.
>
> > Example:
> > <form id="foo" ...>
> > <input type="text" name="fields[title]"/>
>
> > prop = 'fields[title]';
> > $('foo').down('[name='+ prop +']');
>
> > This is related to this
> > posthttp://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thr...
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---