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

214
Views
Spinner only on form submit

I would like to show a spinner only after a form has been submitted. How can I achieve this? I have tried using a boolean variable that is stored in the sessionStorage and modified only when the form is submitted and is located at the window load event but the spinner is never shown. The variable dictates whether the spinner is shown or not:

window.addEventListener("load", function () {
   if (sessionStorage.getItem("submitted") === "true") {
      // display spinner here
   }
});

Kindly provide a vanilla js solution not jQuery, Angular etc...

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If sessionStorage.getItem("submitted") is a boolean value, it's not "true" but just true without the quotes.

sessionStorage.getItem("submitted") === true
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!