On Jan 29, 3:14 am, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Is there a way to to put the id from the select into the id of the url
> instead of the :with param?
>
Instead of using remote_function, write your own js function (in
application.js). Then change the onchange to myfunction(this.value),
or attach an event handler to it.
Fred> = collection_select :category, :id, Category.all, :id, :name, {:prompt
=>
> ''None''}, :onchange =>
>
remote_function(:url=>{:controller=>''sub_categories'',:action=>''get_sub_cate
gories'',:id=>''1''},:method=>''get'',:with=>"''myid=''
> + this.value")
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.