I have radio buttons embedded in my form as
<%= f.radio_button :name_present,true,:class => "namePresent"%>
<%= f.radio_button :name_present,false,:class => "namePresent"%>
and my application.js file contains
$(".namePresent").live('click',function(e){
$("#form").submit();
//form is the id of my form_for
});
All parameters are passed in chrome, but in firefox parameter from radio buttons are not passed.
I should point out that live and bind are both deprecated. You can perform both with .on()
Try:
$(".namePresent").on('click',function(e){
$("#form").submit();
//form is the id of my form_for
});
Look at the link .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With