Different url finished pages based on user responses


Author
Message
InquisitivePhoenix
InquisitivePhoenix
Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)
Group: Forum Members
Posts: 7, Visits: 48
Hi all,

I'm trying to make a script to assign a different url as a finish page depending on which of 4 pictures the user clicks in a trial. Broadly, what do you assign for the finished page when first building the web script on the millisecond website? Both "Redirect to the default finished page" and "redirect to a url" don't seem to work for my purposes. More specifically, how do you use conditionals to assign a finishpage based on the response to a trial?

My script is here: http://research.millisecond.com/hcn/linkboard.web

and here is my code (I might be way off base with the ontrialend statement):

<expt MPref_reasons>
/subjects = (1 of 1)
/ groupassignment = random
/ blocks = [1 = download]
</expt>

<block download>
/ trials = [1 = noreplace(linkboard1)]
</block>

#################################################
##############Linkboard trials###################
#################################################

<trial linkboard1>
/stimulustimes = [1=catpicA; 2=holdpicB; 3=memepicC; 4=nightpicD]
/inputdevice = mouse
/ validresponse = (catpicA, holdpicB, memepicC, nightpicD)
/responsemessage = (catpicA, catlink, 0)
/responsemessage = (holdpicB, holdlink, 0)
/responsemessage = (memepicC, memelink, 0)
/responsemessage = (nightpicD, nightlink, 0)
/responseinterrupt = trial
/correctresponse = (catpicA, holdpicB, memepicC, nightpicD)
/ontrialend = [if (trial.linkboard1 == catpicA)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/k9NQD"
}
else if (trial.linkboard1 == holdpicB)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/2XGJ9"
}
else if (trial.linkboard1 == memepicC)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/E5Lne"
}
else if (trial.linkboard1 == nightpicD)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/K6FgQ"
}
]
</trial>

#########################################
###############Pictures##################
#########################################

<picture catpicA>
/items = ("cat.png")
/position = (20%, 20%)
</picture>

<picture memepicC>
/items = ("meme.png")
/position = (20%, 80%)
</picture>

<picture nightpicD>
/items = ("night.png")
/position = (80%, 80%)
</picture>

<picture holdpicB>
/items = ("hold.png")
/position = (80%, 20%)
</picture>

#####################################
############Link Text################
#####################################

<text catlink>
/ items = ("You will find a link to download the 'Cats' song on the study's finish page")
</text>

<text memelink>
/ items = ("You will find a link to download the 'Meme' song on the study's finish page")
</text>

<text holdlink>
/ items = ("You will find a link to download the 'Hold' song on the study's finish page")
</text>

<text nightlink>
/ items = ("You will find a link to download the 'Night' song on the study's finish page")
</text>

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: 12K, Visits: 98K
InquisitivePhoenix - Wednesday, December 6, 2017
Hi all,

I'm trying to make a script to assign a different url as a finish page depending on which of 4 pictures the user clicks in a trial. Broadly, what do you assign for the finished page when first building the web script on the millisecond website? Both "Redirect to the default finished page" and "redirect to a url" don't seem to work for my purposes. More specifically, how do you use conditionals to assign a finishpage based on the response to a trial?

My script is here: http://research.millisecond.com/hcn/linkboard.web

and here is my code (I might be way off base with the ontrialend statement):

<expt MPref_reasons>
/subjects = (1 of 1)
/ groupassignment = random
/ blocks = [1 = download]
</expt>

<block download>
/ trials = [1 = noreplace(linkboard1)]
</block>

#################################################
##############Linkboard trials###################
#################################################

<trial linkboard1>
/stimulustimes = [1=catpicA; 2=holdpicB; 3=memepicC; 4=nightpicD]
/inputdevice = mouse
/ validresponse = (catpicA, holdpicB, memepicC, nightpicD)
/responsemessage = (catpicA, catlink, 0)
/responsemessage = (holdpicB, holdlink, 0)
/responsemessage = (memepicC, memelink, 0)
/responsemessage = (nightpicD, nightlink, 0)
/responseinterrupt = trial
/correctresponse = (catpicA, holdpicB, memepicC, nightpicD)
/ontrialend = [if (trial.linkboard1 == catpicA)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/k9NQD"
}
else if (trial.linkboard1 == holdpicB)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/2XGJ9"
}
else if (trial.linkboard1 == memepicC)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/E5Lne"
}
else if (trial.linkboard1 == nightpicD)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/K6FgQ"
}
]
</trial>

#########################################
###############Pictures##################
#########################################

<picture catpicA>
/items = ("cat.png")
/position = (20%, 20%)
</picture>

<picture memepicC>
/items = ("meme.png")
/position = (20%, 80%)
</picture>

<picture nightpicD>
/items = ("night.png")
/position = (80%, 80%)
</picture>

<picture holdpicB>
/items = ("hold.png")
/position = (80%, 20%)
</picture>

#####################################
############Link Text################
#####################################

<text catlink>
/ items = ("You will find a link to download the 'Cats' song on the study's finish page")
</text>

<text memelink>
/ items = ("You will find a link to download the 'Meme' song on the study's finish page")
</text>

<text holdlink>
/ items = ("You will find a link to download the 'Hold' song on the study's finish page")
</text>

<text nightlink>
/ items = ("You will find a link to download the 'Night' song on the study's finish page")
</text>

The problem, at a glance, is that the /ontrialend syntax setting the appropriate finish page is off. It ought to read:

<trial linkboard1>
/stimulustimes = [1=catpicA; 2=holdpicB; 3=memepicC; 4=nightpicD]
/inputdevice = mouse
/ validresponse = (catpicA, holdpicB, memepicC, nightpicD)
/responsemessage = (catpicA, catlink, 0)
/responsemessage = (holdpicB, holdlink, 0)
/responsemessage = (memepicC, memelink, 0)
/responsemessage = (nightpicD, nightlink, 0)
/responseinterrupt = trial
/correctresponse = (catpicA, holdpicB, memepicC, nightpicD)
/ontrialend = [if (trial.linkboard1.response == "catpicA")
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/k9NQD"
}
else if (trial.linkboard1.response == "holdpicB")
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/2XGJ9"
}
else if (trial.linkboard1.response == "memepicC")
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/E5Lne"
}
else if (trial.linkboard1.response == "nightpicD")
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/K6FgQ"
}
]
</trial>

trial.linkboard1 does not return anything, much less the response. You need to (1) read the trial's response property --  trial.linkboard1.response -- and the response value should be in quotation marks.

The logic in the script will override the settings you made in the web interface for the finish page / "URL to redirect to", so it doesn't matter what you put there. You can leave that at the default setting.

InquisitivePhoenix
InquisitivePhoenix
Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)
Group: Forum Members
Posts: 7, Visits: 48
Dave - Thursday, December 7, 2017
InquisitivePhoenix - Wednesday, December 6, 2017
Hi all,

I'm trying to make a script to assign a different url as a finish page depending on which of 4 pictures the user clicks in a trial. Broadly, what do you assign for the finished page when first building the web script on the millisecond website? Both "Redirect to the default finished page" and "redirect to a url" don't seem to work for my purposes. More specifically, how do you use conditionals to assign a finishpage based on the response to a trial?

My script is here: http://research.millisecond.com/hcn/linkboard.web

and here is my code (I might be way off base with the ontrialend statement):

<expt MPref_reasons>
/subjects = (1 of 1)
/ groupassignment = random
/ blocks = [1 = download]
</expt>

<block download>
/ trials = [1 = noreplace(linkboard1)]
</block>

#################################################
##############Linkboard trials###################
#################################################

<trial linkboard1>
/stimulustimes = [1=catpicA; 2=holdpicB; 3=memepicC; 4=nightpicD]
/inputdevice = mouse
/ validresponse = (catpicA, holdpicB, memepicC, nightpicD)
/responsemessage = (catpicA, catlink, 0)
/responsemessage = (holdpicB, holdlink, 0)
/responsemessage = (memepicC, memelink, 0)
/responsemessage = (nightpicD, nightlink, 0)
/responseinterrupt = trial
/correctresponse = (catpicA, holdpicB, memepicC, nightpicD)
/ontrialend = [if (trial.linkboard1 == catpicA)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/k9NQD"
}
else if (trial.linkboard1 == holdpicB)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/2XGJ9"
}
else if (trial.linkboard1 == memepicC)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/E5Lne"
}
else if (trial.linkboard1 == nightpicD)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/K6FgQ"
}
]
</trial>

#########################################
###############Pictures##################
#########################################

<picture catpicA>
/items = ("cat.png")
/position = (20%, 20%)
</picture>

<picture memepicC>
/items = ("meme.png")
/position = (20%, 80%)
</picture>

<picture nightpicD>
/items = ("night.png")
/position = (80%, 80%)
</picture>

<picture holdpicB>
/items = ("hold.png")
/position = (80%, 20%)
</picture>

#####################################
############Link Text################
#####################################

<text catlink>
/ items = ("You will find a link to download the 'Cats' song on the study's finish page")
</text>

<text memelink>
/ items = ("You will find a link to download the 'Meme' song on the study's finish page")
</text>

<text holdlink>
/ items = ("You will find a link to download the 'Hold' song on the study's finish page")
</text>

<text nightlink>
/ items = ("You will find a link to download the 'Night' song on the study's finish page")
</text>

The problem, at a glance, is that the /ontrialend syntax setting the appropriate finish page is off. It ought to read:

<trial linkboard1>
/stimulustimes = [1=catpicA; 2=holdpicB; 3=memepicC; 4=nightpicD]
/inputdevice = mouse
/ validresponse = (catpicA, holdpicB, memepicC, nightpicD)
/responsemessage = (catpicA, catlink, 0)
/responsemessage = (holdpicB, holdlink, 0)
/responsemessage = (memepicC, memelink, 0)
/responsemessage = (nightpicD, nightlink, 0)
/responseinterrupt = trial
/correctresponse = (catpicA, holdpicB, memepicC, nightpicD)
/ontrialend = [if (trial.linkboard1.response == "catpicA")
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/k9NQD"
}
else if (trial.linkboard1.response == "holdpicB")
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/2XGJ9"
}
else if (trial.linkboard1.response == "memepicC")
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/E5Lne"
}
else if (trial.linkboard1.response == "nightpicD")
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/K6FgQ"
}
]
</trial>

trial.linkboard1 does not return anything, much less the response. You need to (1) read the trial's response property --  trial.linkboard1.response -- and the response value should be in quotation marks.

The logic in the script will override the settings you made in the web interface for the finish page / "URL to redirect to", so it doesn't matter what you put there. You can leave that at the default setting.
Thanks Dave! I'm still having trouble actually getting the finished page link to show though. Their it goes to a "this page isn't working" page on chrome using windows, from this link:
https://www.millisecond.com/web/finish5.aspx?ScriptPath=http%3A%2F%2Fscripts.millisecond.com%2Fhcn%2Flinkboard%2Flinkboard.iqx&AccountName=hcn&Version=5.0.10.0&GroupID=815773230&SubjectID=222488484&IpAddress=205.208.68.198&MacAddress=2C-41-38-5B-BD-F4&IQRedirect=http%3A%2F%2Fhome.uchicago.edu%2F%00wdanielson%2Fk9NQD

Or on Safari with Mac it generates this link: http://home.uchicago.edu/%00wdanielson/E5Lne
Which changes "~s" into "%00" thus breaking the link. How do I get it to not do this?
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: 12K, Visits: 98K
InquisitivePhoenix - Thursday, December 7, 2017
Dave - Thursday, December 7, 2017
InquisitivePhoenix - Wednesday, December 6, 2017
Hi all,

I'm trying to make a script to assign a different url as a finish page depending on which of 4 pictures the user clicks in a trial. Broadly, what do you assign for the finished page when first building the web script on the millisecond website? Both "Redirect to the default finished page" and "redirect to a url" don't seem to work for my purposes. More specifically, how do you use conditionals to assign a finishpage based on the response to a trial?

My script is here: http://research.millisecond.com/hcn/linkboard.web

and here is my code (I might be way off base with the ontrialend statement):

<expt MPref_reasons>
/subjects = (1 of 1)
/ groupassignment = random
/ blocks = [1 = download]
</expt>

<block download>
/ trials = [1 = noreplace(linkboard1)]
</block>

#################################################
##############Linkboard trials###################
#################################################

<trial linkboard1>
/stimulustimes = [1=catpicA; 2=holdpicB; 3=memepicC; 4=nightpicD]
/inputdevice = mouse
/ validresponse = (catpicA, holdpicB, memepicC, nightpicD)
/responsemessage = (catpicA, catlink, 0)
/responsemessage = (holdpicB, holdlink, 0)
/responsemessage = (memepicC, memelink, 0)
/responsemessage = (nightpicD, nightlink, 0)
/responseinterrupt = trial
/correctresponse = (catpicA, holdpicB, memepicC, nightpicD)
/ontrialend = [if (trial.linkboard1 == catpicA)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/k9NQD"
}
else if (trial.linkboard1 == holdpicB)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/2XGJ9"
}
else if (trial.linkboard1 == memepicC)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/E5Lne"
}
else if (trial.linkboard1 == nightpicD)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/K6FgQ"
}
]
</trial>

#########################################
###############Pictures##################
#########################################

<picture catpicA>
/items = ("cat.png")
/position = (20%, 20%)
</picture>

<picture memepicC>
/items = ("meme.png")
/position = (20%, 80%)
</picture>

<picture nightpicD>
/items = ("night.png")
/position = (80%, 80%)
</picture>

<picture holdpicB>
/items = ("hold.png")
/position = (80%, 20%)
</picture>

#####################################
############Link Text################
#####################################

<text catlink>
/ items = ("You will find a link to download the 'Cats' song on the study's finish page")
</text>

<text memelink>
/ items = ("You will find a link to download the 'Meme' song on the study's finish page")
</text>

<text holdlink>
/ items = ("You will find a link to download the 'Hold' song on the study's finish page")
</text>

<text nightlink>
/ items = ("You will find a link to download the 'Night' song on the study's finish page")
</text>

The problem, at a glance, is that the /ontrialend syntax setting the appropriate finish page is off. It ought to read:

<trial linkboard1>
/stimulustimes = [1=catpicA; 2=holdpicB; 3=memepicC; 4=nightpicD]
/inputdevice = mouse
/ validresponse = (catpicA, holdpicB, memepicC, nightpicD)
/responsemessage = (catpicA, catlink, 0)
/responsemessage = (holdpicB, holdlink, 0)
/responsemessage = (memepicC, memelink, 0)
/responsemessage = (nightpicD, nightlink, 0)
/responseinterrupt = trial
/correctresponse = (catpicA, holdpicB, memepicC, nightpicD)
/ontrialend = [if (trial.linkboard1.response == "catpicA")
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/k9NQD"
}
else if (trial.linkboard1.response == "holdpicB")
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/2XGJ9"
}
else if (trial.linkboard1.response == "memepicC")
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/E5Lne"
}
else if (trial.linkboard1.response == "nightpicD")
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/K6FgQ"
}
]
</trial>

trial.linkboard1 does not return anything, much less the response. You need to (1) read the trial's response property --  trial.linkboard1.response -- and the response value should be in quotation marks.

The logic in the script will override the settings you made in the web interface for the finish page / "URL to redirect to", so it doesn't matter what you put there. You can leave that at the default setting.
Thanks Dave! I'm still having trouble actually getting the finished page link to show though. Their it goes to a "this page isn't working" page on chrome using windows, from this link:
https://www.millisecond.com/web/finish5.aspx?ScriptPath=http%3A%2F%2Fscripts.millisecond.com%2Fhcn%2Flinkboard%2Flinkboard.iqx&AccountName=hcn&Version=5.0.10.0&GroupID=815773230&SubjectID=222488484&IpAddress=205.208.68.198&MacAddress=2C-41-38-5B-BD-F4&IQRedirect=http%3A%2F%2Fhome.uchicago.edu%2F%00wdanielson%2Fk9NQD

Or on Safari with Mac it generates this link: http://home.uchicago.edu/%00wdanielson/E5Lne
Which changes "~s" into "%00" thus breaking the link. How do I get it to not do this?

Ah, thanks! I had missed the "~" in the URLs, and this throws things off because "~" is a special character in Inquisit's syntax and doesn't get properly resolved when set like this. This should work:

<trial linkboard1>
/stimulustimes = [1=catpicA; 2=holdpicB; 3=memepicC; 4=nightpicD]
/inputdevice = mouse
/ validresponse = (catpicA, holdpicB, memepicC, nightpicD)
/responsemessage = (catpicA, catlink, 0)
/responsemessage = (holdpicB, holdlink, 0)
/responsemessage = (memepicC, memelink, 0)
/responsemessage = (nightpicD, nightlink, 0)
/responseinterrupt = trial
/correctresponse = (catpicA, holdpicB, memepicC, nightpicD)
/ontrialend = [if (trial.linkboard1.response == "catpicA")
{
defaults.finishpage = text.finishpage.item(1);
}
else if (trial.linkboard1.response == "holdpicB")
{
defaults.finishpage = text.finishpage.item(2);
}
else if (trial.linkboard1.response == "memepicC")
{
defaults.finishpage = text.finishpage.item(3);
}
else if (trial.linkboard1.response == "nightpicD")
{
defaults.finishpage = text.finishpage.item(4);
}
]
</trial>

<text finishpage>
/ items = finishpages
</text>

<item finishpages>
/ 1 = "http://home.uchicago.edu/~swdanielson/k9NQD"
/ 2 = "http://home.uchicago.edu/~swdanielson/2XGJ9"
/ 3 = "http://home.uchicago.edu/~swdanielson/E5Lne"
/ 4 = "http://home.uchicago.edu/~swdanielson/K6FgQ"
</item>

I've taken the liberty to change your uploaded script accordingly, can you give it a spin? Seems to work fine for me now:

http://research.millisecond.com/hcn/linkboard.web

InquisitivePhoenix
InquisitivePhoenix
Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)Partner Member (619 reputation)
Group: Forum Members
Posts: 7, Visits: 48
Dave - Thursday, December 7, 2017
InquisitivePhoenix - Thursday, December 7, 2017
Dave - Thursday, December 7, 2017
InquisitivePhoenix - Wednesday, December 6, 2017
Hi all,

I'm trying to make a script to assign a different url as a finish page depending on which of 4 pictures the user clicks in a trial. Broadly, what do you assign for the finished page when first building the web script on the millisecond website? Both "Redirect to the default finished page" and "redirect to a url" don't seem to work for my purposes. More specifically, how do you use conditionals to assign a finishpage based on the response to a trial?

My script is here: http://research.millisecond.com/hcn/linkboard.web

and here is my code (I might be way off base with the ontrialend statement):

<expt MPref_reasons>
/subjects = (1 of 1)
/ groupassignment = random
/ blocks = [1 = download]
</expt>

<block download>
/ trials = [1 = noreplace(linkboard1)]
</block>

#################################################
##############Linkboard trials###################
#################################################

<trial linkboard1>
/stimulustimes = [1=catpicA; 2=holdpicB; 3=memepicC; 4=nightpicD]
/inputdevice = mouse
/ validresponse = (catpicA, holdpicB, memepicC, nightpicD)
/responsemessage = (catpicA, catlink, 0)
/responsemessage = (holdpicB, holdlink, 0)
/responsemessage = (memepicC, memelink, 0)
/responsemessage = (nightpicD, nightlink, 0)
/responseinterrupt = trial
/correctresponse = (catpicA, holdpicB, memepicC, nightpicD)
/ontrialend = [if (trial.linkboard1 == catpicA)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/k9NQD"
}
else if (trial.linkboard1 == holdpicB)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/2XGJ9"
}
else if (trial.linkboard1 == memepicC)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/E5Lne"
}
else if (trial.linkboard1 == nightpicD)
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/K6FgQ"
}
]
</trial>

#########################################
###############Pictures##################
#########################################

<picture catpicA>
/items = ("cat.png")
/position = (20%, 20%)
</picture>

<picture memepicC>
/items = ("meme.png")
/position = (20%, 80%)
</picture>

<picture nightpicD>
/items = ("night.png")
/position = (80%, 80%)
</picture>

<picture holdpicB>
/items = ("hold.png")
/position = (80%, 20%)
</picture>

#####################################
############Link Text################
#####################################

<text catlink>
/ items = ("You will find a link to download the 'Cats' song on the study's finish page")
</text>

<text memelink>
/ items = ("You will find a link to download the 'Meme' song on the study's finish page")
</text>

<text holdlink>
/ items = ("You will find a link to download the 'Hold' song on the study's finish page")
</text>

<text nightlink>
/ items = ("You will find a link to download the 'Night' song on the study's finish page")
</text>

The problem, at a glance, is that the /ontrialend syntax setting the appropriate finish page is off. It ought to read:

<trial linkboard1>
/stimulustimes = [1=catpicA; 2=holdpicB; 3=memepicC; 4=nightpicD]
/inputdevice = mouse
/ validresponse = (catpicA, holdpicB, memepicC, nightpicD)
/responsemessage = (catpicA, catlink, 0)
/responsemessage = (holdpicB, holdlink, 0)
/responsemessage = (memepicC, memelink, 0)
/responsemessage = (nightpicD, nightlink, 0)
/responseinterrupt = trial
/correctresponse = (catpicA, holdpicB, memepicC, nightpicD)
/ontrialend = [if (trial.linkboard1.response == "catpicA")
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/k9NQD"
}
else if (trial.linkboard1.response == "holdpicB")
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/2XGJ9"
}
else if (trial.linkboard1.response == "memepicC")
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/E5Lne"
}
else if (trial.linkboard1.response == "nightpicD")
{
defaults.finishpage = "http://home.uchicago.edu/~swdanielson/K6FgQ"
}
]
</trial>

trial.linkboard1 does not return anything, much less the response. You need to (1) read the trial's response property --  trial.linkboard1.response -- and the response value should be in quotation marks.

The logic in the script will override the settings you made in the web interface for the finish page / "URL to redirect to", so it doesn't matter what you put there. You can leave that at the default setting.
Thanks Dave! I'm still having trouble actually getting the finished page link to show though. Their it goes to a "this page isn't working" page on chrome using windows, from this link:
https://www.millisecond.com/web/finish5.aspx?ScriptPath=http%3A%2F%2Fscripts.millisecond.com%2Fhcn%2Flinkboard%2Flinkboard.iqx&AccountName=hcn&Version=5.0.10.0&GroupID=815773230&SubjectID=222488484&IpAddress=205.208.68.198&MacAddress=2C-41-38-5B-BD-F4&IQRedirect=http%3A%2F%2Fhome.uchicago.edu%2F%00wdanielson%2Fk9NQD

Or on Safari with Mac it generates this link: http://home.uchicago.edu/%00wdanielson/E5Lne
Which changes "~s" into "%00" thus breaking the link. How do I get it to not do this?

Ah, thanks! I had missed the "~" in the URLs, and this throws things off because "~" is a special character in Inquisit's syntax and doesn't get properly resolved when set like this. This should work:

<trial linkboard1>
/stimulustimes = [1=catpicA; 2=holdpicB; 3=memepicC; 4=nightpicD]
/inputdevice = mouse
/ validresponse = (catpicA, holdpicB, memepicC, nightpicD)
/responsemessage = (catpicA, catlink, 0)
/responsemessage = (holdpicB, holdlink, 0)
/responsemessage = (memepicC, memelink, 0)
/responsemessage = (nightpicD, nightlink, 0)
/responseinterrupt = trial
/correctresponse = (catpicA, holdpicB, memepicC, nightpicD)
/ontrialend = [if (trial.linkboard1.response == "catpicA")
{
defaults.finishpage = text.finishpage.item(1);
}
else if (trial.linkboard1.response == "holdpicB")
{
defaults.finishpage = text.finishpage.item(2);
}
else if (trial.linkboard1.response == "memepicC")
{
defaults.finishpage = text.finishpage.item(3);
}
else if (trial.linkboard1.response == "nightpicD")
{
defaults.finishpage = text.finishpage.item(4);
}
]
</trial>

<text finishpage>
/ items = finishpages
</text>

<item finishpages>
/ 1 = "http://home.uchicago.edu/~swdanielson/k9NQD"
/ 2 = "http://home.uchicago.edu/~swdanielson/2XGJ9"
/ 3 = "http://home.uchicago.edu/~swdanielson/E5Lne"
/ 4 = "http://home.uchicago.edu/~swdanielson/K6FgQ"
</item>

I've taken the liberty to change your uploaded script accordingly, can you give it a spin? Seems to work fine for me now:

http://research.millisecond.com/hcn/linkboard.web

This looks great, 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