js where I have 'jQuery', the problem is that I am executed twice. Someone can explain to me what is due and how to solve it please. Annex the jQuery ...
$(document).ready(function(){
$("#botonExportar").click(function(){
var data = $("#producto").val();
alert('productoBuscado='+data);
$.post("registrosExportaciones.php",{producto:data}, function(respuesta){
alert('todo bien..'+respuesta);
});
});
});
Here is the html ...
<div class="" align="right">
<form id="registrarExportacion" action="./FPDF/generarReporte.php" method="POST" target="_blank">
<input type="hidden" name="tipoReporte" value="detecciones">
<input type="hidden" name="producto" id="productoBuscado" value="$producto">
<button type="submit" id="botonExportar" class="btn btn-default btn-md exportar" name="button" style="background-color:red !important; margin-top:1%;">Exportar</button>
</form>
</div>