Speak, good afternoon! First of all I would like to wish you all a Merry Christmas!
I am developing a system to control videoconferences and would like to check if it is already registered in the database before continuing the registration.
I already have the function that performs this check and I can make it work correctly when I press the register button at the bottom of the page, but I would like to use the Blur event so this check is done as soon as the "Ticket" field loses focus avoiding the user not having to fill out the entire form to only find out that this record already exists.
My question is, how do I get to run the PHP function under PHP under Javascript, since languages work differently (Client-Side and Server-Side).
<script type="text/javascript">
var ticket = document.getElementById("ticket");
ticket.addEventListener("blur", function( event ) {
document.write('<?php verificaTicket(); ?>');
}, true);
</script>
Thanks everyone! Hugs to all!