Inquisit Web: Sending subjects to different finish Pages


Author
Message
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 110K
leonsbe - 8/26/2026
In Inquisit Web, I need to send participants to one of two pre-defined URLs at the end of a session: a "complete" link and a "screen-out" link (when consent is denied or the experiment aboerted) for a panel provider. Is that possible?

I've tried setting defaults.finishPage in <defaults> and assigning it in /onexptend, but I can't get the script's value to be used instead of the one registered in the experiment settings.

Thanks!

Yes, you need to set the defaults.finishpage property to the desired URL.

But there are a coüple things to note::
(1) In the web experiment settings, the finish page settings must left on the default. If you specify any URL there, that URL will override whatever you set in your script(s).

(2) If you are administering multiple scripts via <batch>, the URLs must be set in the batch script /onScriptEnd, not the task script(s).
(3) Using script.abort() will prevent the opening of any finish page.

Here's a basic, single script example, you can try it out here.https://mili2nd.co/f3mc

<defaults>
/ finishPage = "https://www.example.com/complete" // URL you send participants to if they consent
</defaults>

<parameters>
/ consentDeclined = false
</parameters>

<text consentText>
/ items = ("Do you consent to participate?")
</text>

<button yesButton>
/ caption = "Yes"
/ size = (10%,8%)
/ position = (30%,85%)
</button>

<button noButton>
/ caption = "No"
/ size = (10%,8%)
/ position = (70%,85%)
</button>

<text myText>
/ items = ("Press the space bar to continue")
/ fontStyle = ("Arial", 2.08%, false, false, false, false, 5, 1)
</text>

<trial consentTrial>
/ onTrialEnd = {
    if (this.responseText == "noButton") {
        defaults.finishPage = "https://www.example.com/screenout" // URL you send participants to if they decline consent
        parameters.consentDeclined = true;
    }
}
/ stimulusFrames = [1=consentText, yesButton, noButton]
/ inputDevice = mouse
/ validResponse = (yesButton, noButton)
</trial>

<trial myTrial>
/ preTrialPause = 500
/ stimulusTimes = [1=myText]
/ validResponse = (" ")
</trial>

<block consentBlock>
/ trials = [1=consentTrial]
</block>

<block myBlock>
/ preInstructions = (myPage)
/ trials = [1-10=myTrial]
</block>

<expt myExpt>
/ stop = {
    return parameters.consentDeclined;
}
/ blocks = [1=consentBlock; 2=myBlock]
</expt>

<page myPage>
On the following 10 trials, press the space bar
</page>



leonsbe
leonsbe
New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)New Member (35 reputation)
Group: Forum Members
Posts: 4, Visits: 39
In Inquisit Web, I need to send participants to one of two pre-defined URLs at the end of a session: a "complete" link and a "screen-out" link (when consent is denied or the experiment aboerted) for a panel provider. Is that possible?

I've tried setting defaults.finishPage in <defaults> and assigning it in /onexptend, but I can't get the script's value to be used instead of the one registered in the experiment settings.

Thanks!

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search