Although I know very little javasacript, but try this as well:

<%= radio_button "ab", "cd", { :onclick => "abc( " + <%= weight_array  %> +
" )"; } %>

BTW, you should use join to make weight_array a string before passing to
javascript function. You can recreate the array in javascript, if you wish,
by splitting back.

Thanks,
Abhinav

--
अभिनव
http://twitter.com/abhinav



On Wed, Sep 9, 2009 at 3:09 PM, Hemant Bhargava <
[email protected]> wrote:

>
> Yes Exactly ..
>
> Abhinav Saxena wrote:
> > Please clarify, abc is the javascript function and weight_array is the
> > ruby
> > array, right?
> >
> > Thanks,
> > Abhinav
> > --
> > अभिनव
> > http://twitter.com/abhinav
> >
> >
> >
> > On Wed, Sep 9, 2009 at 2:56 PM, Hemant Bhargava <
>
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to