Escape room in Sparkle and the use of javascript

Hi, we want to create an escape room at our school.
Our pupils hand in their phones and get a device with access to a webpage telling the story and providing atmosphere.
Is there any possibility to compare logically user input on the page, f.e. if input from drop down selection is true/right, the webpage executes f.e. a jump to another page? I am assuming, this asks for js-code, but code-wise I am a bit challenged there…

@Vogeltom, I could try a haphazard guess and suggest using the Sparkle “Menu” at the bottom of the page. Clicking onto True takes them right, clicking onto False takes them left.

These True and False pages you will need to create.

as our dear Hendrik said above, i would algo suggest to strongly use page navigation logic, either with a menu, buttons or transparent boxes on each interaction for forward / backwards.

Shouldn’t be difficult but it may be time consuming if there’s a lot of steps!

Thanks for the input @FlaminFig and @primo!
The “true” or “false” check ist definitely an interesting solution!
Would it be possible to press a button “Check answer” and on click run a javascript a la
"if text1 is “Paris” or “paris” jump, else set text 1 to “Sorry, that does not work”?

Search on the net gives:

let text = “Go to Paris.”;
let result = text.includes(“Paris”);
if result = true anchor1
else let text = “Sorry, that does not work!”;

But as you can see, I am not good at javascript. Do I need to define anchor1 in javascript if I have set up an anchor1 in Sparkle?
(And would


be the right code?

Best regards, Tom

Sorry @Vogeltom, that is a feature Sparkle itself cannot accommodate.

You might need to invest in a bit of javascript to achieve what you are looking to do, and that is something you can in-bed into Sparkle.

Yes, “anchor1” would be the name of the anchor you want the javascript to move the User too once they have clicked…