Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

157
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda