Input on click HTML element

Skip to first unread message

George Crowne

Apr 16, 2021, 10:05:27 AMApr 16
to Minno.js
Hi All,

Really quick question regarding using an HTML element on click input for a miTime trial.

Here's the code snippet for the input portion of the trial:
input: [
    {handle:'end',on:'click',element: ('<button>START</button>')}

I'm trying to simply create a button to progress through the trial. This code snippet works when running the .js file directly, however when accessing it through the .expt.xml file, I get an error that reads:

Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.

The button created in the code snippet doesn't appear due to the error. Does anyone have any idea how to make this code snippet work when accessing it through the .expt.xml file? Hopefully this is a quick fix.

Thanks in advance!

Elad Zlotnick

Apr 18, 2021, 1:41:46 PMApr 18
to Minno.js
Hi George,

The reasonable way to do this is by creating a regular stimulus.
You can use html media in order to create the button:

Then you can identify the stimulus for the click input by using "stimHandle".
For setting stimHandle see the documentation here:
And an example here: (see the third trial example).

Reply all
Reply to author
0 new messages