How to redirect participants to different urls, depending on their groupid


Author
Message
lfj88
lfj88
Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)
Group: Forum Members
Posts: 10, Visits: 45
Dear reader,

I have one script that needs to redirect participants from 4 different conditions to 4 different urls. The finish page in my account on Millisecond only allows for one url, so I tried to create a referral to the url in the Inquisit script, which times out after x milliseconds (not ideal, but as far as I know the link just needs to be opened to confirm the participant has completed the study and I don't think the participant has to click anything on that webpage). I need to be able to change that url depending on the groupid. I tried it using a list or a value, but both do not seem to work.

See below for the relevant code I used. For the url, I put in a google page as an example. So far, I only specified the url for groupid=1. In the code below, I try to use the list. I have also tried it with value. In that case: in the expt command, I then substituted 
list.prolific_url.appenditem("?gfe_rd=cr&ei=DPrGV_yAGsexOuyWvPAK#q=happy")
 with
values.urlvalue = "?gfe_rd=cr&ei=DPrGV_yAGsexOuyWvPAK#q=happy"
and in the html command, I substituted
<% list.prolific_url.currentvalue %>
with
<% values.urlvalue %>

However, both do not seem to work. Using a value (opposed to a list) seems most effective, as it does print the correct url when I add "https://www.google.nl/<% values.urlvalue %>"in a caption of a radiobuttons item that happens to be in my script, but when it actually opens the url later in the script, it seems to use the original value of urlvalue ('bla'), not the value that should be assigned to urlvalue on the beginning of the experiment.

Any ideas as to what goes wrong or how else I can accomplish the goal of redirecting participants to different urls, depending on their groupid?

Kind regards,
Lin

*** URL PARTICIPANTS NEED TO BE SENT TO UPON COMPLETION OF STUDY ***
<list pr_url>
/selectionmode = sequence
</list>

<values>
/ urlvalue = "bla"
</values>

<html pr_url>
/items = ("https://www.google.nl/<% list.prolific_url.currentvalue %>")
</html>

<trial pr_url>
/stimulusframes = [1=pr_url]
/showmousecursor = True
/timeout = 10000
</trial>

<block pr_url>
/trials = [1=pr_url]

***EXPERIMENT***
<expt RC>
/ blocks = [1=resolution; 2=consent; 3=distr; 4=forced_choice_block1; 5=forced_choice_block2; 6=forced_choice_block3; 7=forced_choice_block4; 8=forced_choice_block5; 9=demographics; 10=pr_url]
/ postinstructions = (end)
/ onexptbegin = [if (script.groupid == 1) {list.condition_names.appenditem("very negative"); list.condition_names.appenditem("slightly negative"); list.condition_names.appenditem("VERY NEGATIVE"); list.prolific_url.appenditem("?gfe_rd=cr&ei=DPrGV_yAGsexOuyWvPAK#q=happy");}]
/ onexptbegin = [if (script.groupid == 2) {list.condition_names.appenditem("slightly negative"); list.condition_names.appenditem("very negative"); list.condition_names.appenditem("SLIGHTLY NEGATIVE");}]
/ onexptbegin = [if (script.groupid == 3) {list.condition_names.appenditem("slightly positive"); list.condition_names.appenditem("very positive"); list.condition_names.appenditem("SLIGHTLY POSITIVE");}]
/ onexptbegin = [if (script.groupid == 4) {list.condition_names.appenditem("very positive"); list.condition_names.appenditem("slightly positive"); list.condition_names.appenditem("VERY POSITIVE");}]
</expt>



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
lfj88 - 8 Years Ago
Dave - 8 Years Ago
lfj88 - 8 Years Ago
Dave - 8 Years Ago
Dave - 8 Years Ago
                         So, here's a little script to test: Condition 1:...
Dave - 8 Years Ago
                             Hi Dave, Thanks for all the answers! That's an earlier version of the...
lfj88 - 8 Years Ago
                                 + x [quote] [b] lfj88 - Thursday, September 1, 2016 [/b]...
carolin.m - 7 Years Ago
                                     + x [quote] [b] carolin.m - Thursday, July 6, 2017 [/b]...
Dave - 7 Years Ago
                                         + x [quote] [b] Dave - Thursday, July 6, 2017 [/b] +...
carolin.m - 7 Years Ago
                                             + x [quote] [b] carolin.m - Friday, July 7, 2017 [/b]...
Dave - 7 Years Ago
                                                 + x [quote] [b] Dave - Friday, July 7, 2017 [/b] +...
carolin.m - 7 Years Ago
                                                     + x [quote] [b] carolin.m - Monday, July 10, 2017 [/b]...
Dave - 7 Years Ago
                             + x [quote] [b] Dave - Thursday, September 1, 2016 [/b]...
carolin.m - 7 Years Ago
                                 + x [quote] [b] carolin.m - Monday, July 10, 2017 [/b]...
Dave - 7 Years Ago
                                     + x [quote] [b] Dave - Monday, July 10, 2017 [/b] +...
carolin.m - 7 Years Ago
                                         + x [quote] [b] carolin.m - Friday, July 28, 2017 [/b]...
Dave - 7 Years Ago
                                             + x [quote] [b] Dave - Friday, July 28, 2017 [/b] +...
carolin.m - 7 Years Ago
                                     + x [quote] [b] Dave - Monday, July 10, 2017 [/b] +...
carolin.m - 7 Years Ago
                                         + x [quote] [b] carolin.m - Monday, July 31, 2017 [/b]...
Dave - 7 Years Ago
                                             + x [quote] [b] Dave - Monday, July 31, 2017 [/b] +...
carolin.m - 7 Years Ago
                                                 + x [quote] [b] carolin.m - Tuesday, August 1, 2017 [/b]...
Dave - 7 Years Ago
                                                     + x [quote] [b] Dave - Tuesday, August 1, 2017 [/b] +...
carolin.m - 7 Years Ago
                                                         + x [quote] [b] carolin.m - Thursday, August 3, 2017 [/b]...
Dave - 7 Years Ago
                                                             + x [quote] [b] Dave - Thursday, August 3, 2017 [/b]...
carolin.m - 7 Years Ago
                                                                 + x [quote] [b] carolin.m - Friday, August 4, 2017 [/b]...
Dave - 7 Years Ago
M Gerathy - 3 Years Ago
Dave - 3 Years Ago

Reading This Topic

Explore
Messages
Mentions
Search