如何在不提交表单的情况下获得下拉选择的值

时间:2018-10-17 06:51:27

标签: jquery ruby ruby-on-rails-4

使用两个下拉菜单,我想将数据加载到弹出窗口中,在我的示例中,我想将选择的值from_stageto_stage传递到下面的链接,以打开弹出窗口

<div class="form-group to_stage_id">
  <%= label_tag :to_stage,'To stage<span class="text-danger">*</span>'.html_safe,class: "col-lg-3 control-label" %>
  <% value1 = "0" %>
  <div class="col-lg-9">
    <%= select_tag :to_stage_id, options_for_select(@places,stage_ids[1]),id: :to_stage_id,class: "form-control cls_to_stage",:onchange =>"loadToStage();",:prompt => "--Select To Stage--",:required => true%>
  </div>
</div>
<div class="form-group" id = "service_id" value = "">
  <%= label_tag :add_services,'Services<span class="text-danger">*</span>'.html_safe,class: "col-lg-3 control-label" %>
  <%= link_to "Add Services".html_safe,{:controller => "ges", :action => "get_services",:remote => true},"data-toggle" => "modal", 'data-target' => "#track_popup" %>
</div>

0 个答案:

没有答案