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 post
http://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thread/ac34b0dc78b364c7
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
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:
> <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-/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
-~----------~----~----~----~------~----~------~--~---
This works. Thanks. On Jun 13, 1:44 pm, kangax <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <louiswa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/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 -~----------~----~----~----~------~----~------~--~---