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

191
Views
How to refresh a quiz without refreshing the web page?

I'm trying to add button to refresh the Quiz after answering the questions incorrectly but when I click reload it reloads the whole page instead, I'm using the function below, really appreciate any help. thanks

       $(function() {
                $("#myButton").click(function() {
                    window.location.reload();

                });
            });

Working Example Here

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

0

It sounds like you want to reset the form instead of refreshing the page. window.location.reload(); is basically hitting CTRL+R.

Consider just resetting the form tag.

document.getElementById('myform').reset();

Keep in mind, however, that you'll still have to reset any values located elsewhere (like the js files) that were based on user input.

If you want to retain the results of the quiz and visit another webpage, then you'll need to use AJAX and store the values in a backend somewhere.

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!