Timer for multiple stages

35 views
Skip to first unread message

Bret Sheeley

unread,
Feb 11, 2025, 2:14:03 PM2/11/25
to LIONESS Lab help and discussion
Hi, LIONESS team.

I am trying to program an experiment in which participants are presented with grids of letters and asked to identify how many times a specific letter appears in each grid. Each letter-grid occupies its own stage in LIONESS. I want to allow participants 5 minutes to complete as many letter-search grids as possible. After 5 minutes, participants will auto-advance to the next part of the experiment. To prevent random guessing, participants are penalized 5 seconds for each incorrect answer that they answer, meaning they are unable to click the "Continue" button and proceed to the next stage (i.e., the next grid) for 5 seconds.

Two questions:
  1. Is it possible to program a 5-minute timer that covers multiple stages in LIONESS and then auto-advances participants to the next part of the experiment when time is up?
  2. Is it possible to disable the "Continue" button for 5 seconds if participants answer incorrectly? 
I have searched online for custom JS code to accomplish this but have so far come up short. I appreciate any help you can provide. Thank you!

Lucas Molleman

unread,
Feb 11, 2025, 2:28:35 PM2/11/25
to Bret Sheeley, LIONESS Lab help and discussion
Hi Bret,

My guess is that your life would be much easier if you would program this in one stage. You can use a button that fires a JavaScript function that (1) checks whether the entry is correct; if no: (2a) disable the button for 5 sec; if yes (2b) writes the participant entries to the database, and (3) updates the grid. You can then use the auto-advance that is built into LIONESS. 

does this make sense?

Cheers, Lucas

--
You received this message because you are subscribed to the Google Groups "LIONESS Lab help and discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lioness-lab...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/lioness-lab/6d3e711e-ac4e-4647-bc93-1016a0e2090bn%40googlegroups.com.

Bret Sheeley

unread,
Feb 11, 2025, 3:58:59 PM2/11/25
to LIONESS Lab help and discussion
Hi, Lucas.

Thanks so much for your quick and helpful response. Yes, that makes sense. I am comfortable completing step (1) that you listed, but do you have advice on how to execute step (2a) and (3)? Specifically, I don't know how to (2a) disable the button or (3) update to the next grid. Is there an online resource that I can consult to figure this out, or do you happen to know code that would complete these steps?

Thanks again for your helpful reply. I appreciate it.

Best regards,
Bret

Lucas Molleman

unread,
Feb 12, 2025, 8:10:30 AM2/12/25
to Bret Sheeley, LIONESS Lab help and discussion
Hi Bret,

In the LIONESS repository you can search for "button click letter grid". Here I have made a quick prototype that should get you underway. Hope it's useful!

Cheers, Lucas

Bret Sheeley

unread,
Feb 12, 2025, 5:02:31 PM2/12/25
to LIONESS Lab help and discussion
Thank you, Lucas. I appreciate your advice. This is very helpful.
Reply all
Reply to author
Forward
0 new messages