<div class="row" id="gas_analyte1">
<div class="col-md-3">
Gas Analyte 1<br>
<%= f.select :gas_analyte, @Gases, {include_blank: 'Select Gas', size:15},{style: "width:150px;",class: "gas_search"} %><br>
</div>
</div>
@Gases is an array of gases such as carbon monoxide that is created in the controller.
In Javascript, if a user clicks on the add button, I would like to add another select box to the input page so I have this so far
$('#gas_analyte_btn').click(function(){
$('#gas_analytes').append('<div id="gas_analyte'+(i).toString()+'" class="row"><div class="col-md-3">Gas Analyte '+(i).toString()+'<br><input size="15" type="text" name="search[gas_analyte'+(i).toString()+']" id="search_gas_analyte'+(i).toString()+'" />
});
The problem I having is that the javascript created a Textarea and not a select option. How can I create a select option that I can select from @Gases in the Javascript?
Thank you
selectandoptiontags