Re: link_to_remote multiple :with =>

Frederick Cheung
Mon, 07 Jul 2008 15:43:35 -0000

On 7 Jul 2008, at 16:01, Richard Schneeman wrote:

>
> i have a link to remote and i need to pass two values provided by
> select
> boxes to it, a language, and a page count (hits per page to be
> paginated) how do i get the code below to send both arguments??
>
> <%= link_to_remote "#{element}", :update =>
"a_z_replace", :loading =>
> "Element.show(''a_z_indicator'')", :loaded =>
> "Element.hide(''a_z_indicator'')", :url =>
{:action =>
> ''a_z_search'', :ltr
> => "#{element}"},
>
> :with =>
"''a_z_language=''+$(''selectbox'').value
&&
>
''page_count=''+$(''page_count'').value"
%>|

Your with fragment should evaluate to a valid query string fragment.
I''ve got some examples of this at
http://spacevatican.org/2008/5/17/with-or-without-you-link_to_remote-s-mysterious-parameter

Fred
>
>
>
> Rails 2.0.2, both arguments are individually valid expressions and i
> can
> get them to do what i want, but i don''t know how to concatenate
them
> into a single expression
>
> Thanks,
> Richard
> www.slangasaur.us
> --
> 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---