I''m trying to pass the argument from a select box with a link_to call. This works with link_to_remote, but i absolutely cannot use ajax in this situation. What is the correct way to pass my select_tag argument as a parameter in my link_to? <%= link_to "C", :action => ''a_z'', :ltr => "C", :with => "''a_z_language =''+$(''selectbox'').value" %>| <%= select_tag(:selectbox,options_for_select(["Chinese", "Dutch", "English", "French","German","Greek", "Italian", "Japanese", "Korean", "Portuguese", "Russian","Spanish"], @default)) %> RETURNS> with: "''a_z_language =''+$(''selectbox'').value" INSTEAD OF> with: "English" -- 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 -~----------~----~----~----~------~----~------~--~---
On Jul 6, 8:53 pm, Richard Schneeman <rails-mailing-l...@andreas- s.net> wrote:> I''m trying to pass the argument from a select box with a link_to call. > This works with link_to_remote, but i absolutely cannot use ajax in this > situation. What is the correct way to pass my select_tag argument as a > parameter in my link_to? >A form would be the easiest way (if you have to have a link you could have the link''s onclick be someForm.submit()). Fred.> <%= link_to "C", :action => ''a_z'', :ltr => "C", :with => "''a_z_language > =''+$(''selectbox'').value" %>| > > <%= select_tag(:selectbox,options_for_select(["Chinese", "Dutch", > "English", "French","German","Greek", "Italian", "Japanese", "Korean", > "Portuguese", "Russian","Spanish"], @default)) %> > > RETURNS> > with: "''a_z_language =''+$(''selectbox'').value" > > INSTEAD OF> > with: "English" > -- > Posted viahttp://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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On Jul 6, 8:53�pm, Richard Schneeman <rails-mailing-l...@andreas- > s.net> wrote: >> I''m trying to pass the argument from a select box with a link_to call. >> This works with link_to_remote, but i absolutely cannot use ajax in this >> situation. What is the correct way to pass my select_tag argument as a >> parameter in my link_to? >> > A form would be the easiest way (if you have to have a link you could > have the link''s onclick be someForm.submit()). > > Fred.a form wouldn''t work for my particular application, i really need to pull out the values from one field and use put those values in the parameters of a link_to call. Thanks Though. -- 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jul 6, 11:40 pm, Richard Schneeman <rails-mailing-l...@andreas- s.net> wrote:> Frederick Cheung wrote: > > A form would be the easiest way (if you have to have a link you could > > have the link''s onclick be someForm.submit()). > > > Fred. > > a form wouldn''t work for my particular application, i really need to > pull out the values from one field and use put those values in the > parameters of a link_to call. Thanks Though.I suppose you could do something really fugly where in the link''s onclick you modify this.href (ie what the link points at) and then return true (so that the event processing continues). I''d be very surprised if you couldn''t coerce a form to do what you need. Fred --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---