Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

149
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda