suakx devlog
link
select文でcheckboxのon/offで挙動の変え方


<%= select("model", "model_id", 
    Model.find(:all, :order => "name", ).collect {|p| [ p.name, p.id ] },,
    :onchange => "#{remote_function(:update => 'body', 
    :url => { :action => :update_body }, 
    :with => "'id=' + value + '&check=' + document.getElementById('check').checked") }") %>
チェックを含む<input type="checkbox" id=check" />
とやっておくと

params[:check]
で条件を変える事が出来ます。

blog comments powered by Disqus