How to set a duration of an inline_html
Hello,
I am trying to set a duration of 1750 ms on an inline_html.
I would like to display a white text "Såg du den här bilden nyss?" in the center of a black screen for 1750 ms and then it should go to the next step without any input. It should also change dynamically according to the screen size, that is why I am doing it in HTML and not on sketchpad.
If you have any alternative solution I am also interested.
Thank you in advance for your answer.
Comments
Hi @Sara_MC ,
The
inline_htmlitem is essentially a regular HTML page and thus allows you to embed JavaScript. Through this route you can usesetTimeout()to programmatically click on a submit button after a certain interval. Below you can see how this works, though you will need to modify it for your purpose:<input type='text' name='text_response'> <input type='submit' value='ok' id='submit-button'> <script> // The () => { function body } notation is a so-called arrow function setTimeout(() => document.getElementById('submit-button').click(), 1750) </script>Hope this helps!
— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!