Hi this is my second post (and second week programming, ever) so apologies in advance.
I have a list of checkboxes that represent different search filters that I want passed to params. For example, if this were a restaurant search, I would want my users to be able to check off different types of cuisine that they are interested in. Just like Yelp.
All I want to do is to send the new parameters each time someone clicks on an option. I DON'T care about AJAX right now (I'll cross that bridge when I come to it).
Can i do this with an observe_form even though I'm not using AJAX? Can I use javascript? I've seen stuff about "event handlers" but i have no idea what those are. I hate to give up and ask but i've now been working for 19 hours and I can't handle anymore. Thanks!
CODE: (UPDATED FOR TYPO)
<div id="cuisine_form_div">
<% form_tag(hotels_path, :method => "GET", :id => :cuisine_form ) do %>
<%= check_box_tag('my_cuisine[]', 'Mexican', :onclick => "document.cuisine_form.submit();" ) %>
<%= label_tag(:my_cuisine, "Mexican", :onclick => "document.cuisine_form.submit();" ) %>
<%= check_box_tag('my_cuisine[]', 'Delis') %>
<%= label_tag(:my_cuisine, "Delis") %>
<%= submit_tag 'update' %>
<% end %>
</div><!--end.id="cuisine_form_div"-->
Note that whenever I insert the javascript like above, it prechecks the box on the screen but doesn't submit any info to the URL. If I click the submit button, everything works great, but "onclick" I can't get the URL to budge.