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

176
Views
Complete child app ajax call when navigating in parent application

I have one main parent app with a home button which navigates the user to the main parent app landing page using document.location. My parent app renders a lot of vanilla javascript applications on run time using tiles. Each tile within my parent app represents the child vanilla js app which doesn't share its context with the parent app. Now within the child app user can initiate or execute a function which can take around a few seconds to a minute (don't ask why please). Within that time, the user can click the parent home button. Now my main question is how do I make sure that I complete my child's function execution (which is a promise) before the parent completes navigation or even initiates the navigation. Is there any workaround to this problem? I wish I could change this design but it is a legacy application with not much room for innovation.

One solution I can think of:-

When parent app starts navigation, during that event execution add script tag to the parent. In that script tag then I can run my custom code.

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