I don''t seem to be able to create dynamic keys names, is this possible?
parameters: { ''group-'' + id: $(''group-'' +
id).value }
-Daniel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Hey there, Daniel Eben Elmore a écrit :> parameters: { ''group-'' + id: $(''group-'' + id).value }Yeah, literal syntax won''t cut it. Use the [] operator on a pre-declared variable: var params = {}; params[''group-'' + id] = $F(''group-'' + id); ... parameters: params -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
AFAIK the only way to do that is something like:
var params = {};
params[''group-''+id] = $(''group-''+id).value;
..{
parameters: params
}..
Colin
Daniel Eben Elmore wrote:> I don''t seem to be able to create dynamic keys names, is this
possible?
>
> parameters: { ''group-'' + id: $(''group-''
+ id).value }
>
>
> -Daniel
>
>
>
> >
> .
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Dammit, you beat me by one minute! lol<br>
<br>
Christophe Porteneuve wrote:
<blockquote
cite="mid:45E7EEB8.9000600-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org"
type="cite">
<pre wrap="">Hey there,
Daniel Eben Elmore a écrit :
</pre>
<blockquote type="cite">
<pre wrap="">parameters: { ''group-'' + id:
$(''group-'' + id).value }
</pre>
</blockquote>
<pre wrap=""><!---->
Yeah, literal syntax won''t cut it. Use the [] operator on a
pre-declared variable:
var params = {};
params[''group-'' + id] = $F(''group-'' + id);
...
parameters: params
</pre>
</blockquote>
<br>
--~--~---------~--~----~------------~-------~--~----~<br>
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group. <br> To post to this
group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <br> To
unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
<br> For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en <br>
-~----------~----~----~----~------~----~------~--~---<br>
</body>
</html>
<br>