Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

114
Vistas
jquery submit (repacaptcha) function works only on second click

I have added recaptcha v3 on my website and works fine, but the problem is that I need two times click to submit my form. On first click its generates token and on the second its load the website. Could I just make that my one click on the button would count as two?

 <script>
     $(document).ready(function() {
    $("#wyz_registration_form").submit(function(event) {
    
        event.preventDefault();
        var email = $('#wyz_user_email').val();
        var user = $('#wyz_user_register').val();
    
  
        grecaptcha.ready(function() {
            grecaptcha.execute('MYKEY', {action: 'testine_forma'}).then(function(token) {
                //console.log(token);
                $('#wyz_registration_form').prepend('<input type="hidden" name="token" value="' + token + '">');
                $('#wyz_registration_form').prepend('<input type="hidden" name="action" value="testine_forma">');
                $('#wyz_registration_form').unbind('submit').submit();
            });;
        });
  });
 // $("button").click(function(){  //make my button click two times
    //   $(this).dblclick(); 
   //$("#wyz_registration_form").submit();
  
  // console.log('testas');
 // });


about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda