JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.10.0/css/bootstrap-select.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.10.0/js/bootstrap-select.min.js"></script>
<div class="form-group col-md-4">
<label for="cSetor">Setor</label>
<select class="form-control selectpicker" data-live-search="true" title="--" name="tSetor" id="cSetor">
<option value="1">setor 1</option>
<option value="2">setor 2</option>
<option value="3">setor 3</option>
</select>
</div>
<div class="form-group col-md-4">
<label for="cFuncionario">Funcionário</label>
<select class="form-control selectpicker" data-live-search="true" title="--" name="tFuncionario" id="cFuncionario">
</select>
</div>
JavaScript
$(document).ready(function() {
$('#cSetor').on('change', function(){
$.post('_require/_jp/jpcarregafuncionario.php',
{
id_fun: /*enviar array com os IDs de funcionários*/
},
function (res) { $('#cFuncionario').html(res).selectpicker('refresh');
}
)
})
})