Re: .down with inputs named as array

kangax
Fri, 13 Jun 2008 17:44:33 -0000

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
<louiswa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> Having problems using the down function to find inputs which have been
> named as an array.
>
> Example:
>
>
>
> prop = ''fields[title]'';
> $(''foo'').down(''[name=''+ prop
+'']'');
>
> This is related to this
posthttp://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thr...