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

140
Views
How can I stop users from editing the url in a multi-page quiz?

I have seen a few different online quizzes/forms where there are multiple webpages used. If you try to skip a page by editing the URL (for example, you are on www.exampledomain.com/pg2 and you edit it to www.exampledomain.com/pg3), it would redirect you back to the page you didn't finish.

I am working on an online game with a different webpage for each level. I would like help finding a way in which I can prevent users from editing the URL of a level and skipping to the next. Is there a way I can code this in JavaScript, jQuery, etc.?

Thanks!

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

0

Yes, create a JavaScript array of changes that you want to make on each level and edit the DOM whenever the level gets completed with the help of that array. May be you could use a counter variable to get incremented whenever one level gets completed, and set that variable as the array index to get the respective change.

Whenever you make these kind of online games, try to have some elements which are going to have some traits that are common say if its a obstacle avoidance game then you may have the walls in common but their arrangements might change according to the level. So I assume that even your game would have such kind of elements. If so then the job is quite simple , you can just alter the specific elements of the page after one level gets completed with the help of JavaScript.

Say Level 1 got completed then you can set a condition whether the user as completed the task or not if yes then with the help of JS create a modal screen that asks them to either to continue or leave, if they choose to continue then don't use a separate HTML file to create the next level just use JS and alter the DOM with some methods like innerHtml or innerText.

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!