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

147
Vistas
B2C - How to Trigger a Click on a create account link

I used this documentation to split email verification and signup.

On the authentication page, I would like to trigger a click on the creation account link when the variable param = true (retrieved from another js file in localStorage).

the param variable has true value but the click does not triggered. The same code works in a simple html and js page.

JS code

if (localStorage.getItem('param') == 'true') {
            alert(localStorage.getItem('param')); //true value but don't execute the click function
            localStorage.setItem('param', false);
            document.getElementById("createAccount").click();
}

enter image description here

How can I do it please.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Thanks @Jas Suri - MSFT for pointing OP in the right direction. Posting it as an answer to help other community members.

Include document.ready() method that is used to prevent other code from running till the document is completely loaded.

Please note that there is a chance that your jQuery code won't work if you don't use document.ready()

So, to trigger a click on a create account link, make sure to run your code after calling document.ready() .

Check this link to know how to use document.ready() .

about 4 years ago · Juan Pablo Isaza Denunciar
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