Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

151
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!