Good Afternoon, I would like to fill the contents of a panel from a selected data in the select.
My code seems correct, below what I have so far:
HTML
<div class="panel panel-primary">
<div class="panel-heading" data-toggle="tooltip" data-placement="bottom" title="Aqui apresentamos a os responsáveis por Hosting">
<div class="row">
<div class="col-lg-8">
<h4>Hosts - Pontos Críticos - <?php echo date('d/m/Y',strtotime($data_recente)); ?></h4>
</div>
<div class="col-lg-4">
<form>
<div class="form-group">
<label>Período de tempo:</label>
<select class="form-control" id="tempo">
<option>-----</option>
<option value="sem">Última Semana</option>
<option value="mes">Último Mês</option>
<option value="tri">Último Trimestre</option>
</select>
<input type="button" class="btn btn-success btn-sm" id="mostrar" value="OK"></input>
</div>
</form>
</div>
</div>
</div>
<div class="panel-body" id="conteudo">
<!-- LOAD DA TABELA -->
</div>
JAVA SCRIPT:
$(document).ready(function(){
$("#mostrar").click(function(){
var tabID = $("#tempo").val();
$("#conteudo").load("/var/www/html/novo/pages/capacidade/relatorios/tic/hosting/tabela_crit.php?id="+tabID);
alert('ok');
});
});
table_crit.php:
From a switch in the $ tabID it makes a query and then populates a table.
I await answers. Thank you.