Javascript loop when calling focus event -
i trying validate form, , testing event handlers new them. wondering why code loop, in sense moment click on input field messages keeps on showing. have thought of adding boolean stop it, there better way? $(document).ready(function(){ function test() { alert("this keeps showing up!"); } document.formulario_reserva.dni.addeventlistener("focus", test, false); });