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”
On Jul 6, 8:53 pm, Richard S. <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.
Frederick C. wrote:
On Jul 6, 8:53�pm, Richard S. <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.
On Jul 6, 11:40 pm, Richard S. <rails-mailing-l…@andreas-
s.net> wrote:
Frederick C. 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