I am doing a search in a form and that for example the user adds an id and that this id is stored in a variable and performs the search in the database.
For showing the data in the JavaScript I have no problems. The problem is that as it is a pop-up in real time, I do not know how to send the data of input
to the search.
I put the code:
// formulario
<form id="alerta2">
<input type="text" id="tickeid" name="tickeid" placeholder="Buscar Tu ticket">
</form>
// codigo javascript
<script>
$("#alerta2").submit(function(){
dialog.alert({
title: "Busqueda Realizada:",
message: "<?php echo $ticket_id; ?>",
button: "Cerrar",
animation: "fade",
callback: function(value){
console.log(value);
}
});
return false;
});
</script>